Monday, December 19, 2011

Re: wqall! and closing buffers without a filename

On 12/18/11 23:27, Chris Lott wrote:
> I know I can do :wqall to close all buffers and quit if all have
> filenames, but how can I close all buffers and quit and *discard*
> buffers without filenames?

I think you'd have to write all that have names and then
force-quit on the rest, something like

:sil! wa | qa!
:sil! wa! | qa!

The second one will force writes even for read-only files, for
new named-files that would overwrite an existing file, etc.


Alternatively, you could jockey the 'buftype'=nofile and
'bufhidden'=delete settings for your non-named files so that they
get ignored (mentioned at ":help new-buftype") either via an
autocmd or a manual :bufdo command.

-tim


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