On Thu, Mar 24, 2011 at 4:07 AM, Caesarmv <[hidden email]> wrote:
> This is my first message. Can you see me?
> My question is: how to close all unvisible buffers?
> For example: I have 5 tabs opened (5 visible buffers) and many unvisible
> buffers (I am seeing with :ls command).
You could define a function like the following:
let lastBuffer = bufnr('$')
let currentBuffer = 1
while currentBuffer <= lastBuffer
if bufexists(currentBuffer) && buflisted(currentBuffer) &&
bufwinnr(currentBuffer) < 0
execute 'bdelete' currentBuffer
let currentBuffer = currentBuffer + 1
.. and map that to a useful key sequence.
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php