Thanks for your response.
10x
-- 2011/3/25 Bob Hiestand <bob.hiestand@gmail.com>
On Thu, Mar 24, 2011 at 4:07 AM, Caesarmv <caesarmv@gmail.com> wrote:Yes.
> This is my first message. Can you see me?
You could define a function like the following:
> 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).
function! CloseHiddenBuffers()
let lastBuffer = bufnr('$')
let currentBuffer = 1
while currentBuffer <= lastBuffer
if bufexists(currentBuffer) && buflisted(currentBuffer) &&
bufwinnr(currentBuffer) < 0
execute 'bdelete' currentBuffer
endif
let currentBuffer = currentBuffer + 1
endwhile
endfunction
.. 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
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
No comments:
Post a Comment