On 12/02/10 6:44 AM, Benjamin R. Haskell wrote:
If I have two windows open, and one of them is a 'help' buffer, closing the other buffer exits the program. I would like to get this same behavior with the 'Results' buffer from the dbext extension. (i.e. while editing an SQL file and running some queries from within, if I then do ':q' or 'ZZ', the whole program should exit.)
I suggest setting this up as a scratch buffer :setl bt=nofile (For other options you might consider, see :help special-buffers) and putting an autocommand in it to close it when it is the only window left: :au <buffer> WinEnter * if len(tabpagebuflist()) == 1 | q | endif It might work well enough. There are definitely some edge cases that might not do what you want, though, e.g. :only from within the results window. Ben. -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php