- Am 02.11.2012 11:49, schrieb Paul:
> I don't see a command to delete all buffers except the current oneOf course ... although you should not expect a one-click solution.
> (like :tabonly). Is it possible without a script?
Just note that the :bd command accepts a range.
If you have around 20 buffers and the current buffer number is 7 (check
current buffer number with 2<C-G> ), you can do:
:1,6 bd| 8,99 bd
:1,6 bd!| 8,99 bd! " discard modified buffers
:sil! 1,6bd| sil! 8,99bd " keep modified buffers
:conf 1,6bd| conf 8,99bd " ask what to do with mod. buffers
" do the same with :bun or :bw ...
Don't use ranges :8,$ or :%, these are still line-ranges (whether
buffers are affected depends on the number of lines in your buffer).
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