Wednesday, April 6, 2011

Re: empty buffers

On 06/04/11 17:36, Tom wrote:
> Hello.
>
> How do I get rid of empty buffers in vim alltogether? I never have a
> use for them and find myself always deleting them because they are in
> my buffer list.
>
> Greetings,
>
> Tom
>

[NoName] buffers which aren't displayed in a window are usually
unlisted: :ls won't list them but :ls! will.

There may be a difference if you've set the 'hidden' option, which I
haven't.

You can make any buffer unlisted by means of :bdelete, or remove all
traces of it, and of anything remembered about it, by :bwipeout (use
sparingly). In both cases any window containing the buffer will be
closed, and in neither case will the buffer number be reused in the
current Vim session (after :bdel but not after :bw the buffer number is
actually still in use).

See
:help 'hidden'
:help :ls
:help :bdelete
:help :bwipeout
:help unlisted-buffer
:help new-unlisted-buffers

Best regards,
Tony.
--
"How do you like the new America? We've cut the fat out of the
government, and more recently the heart and brain (the backbone was
gone some time ago). All we seem to have left now is muscle. We'll be
lucky to escape with our skins!"

--
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: