I'd like to be able to delete a buffer in a tab, but still retain the
tab. Right now, Vim just closes the tab. Is there any way I can
configure Vim to do this?
Example,
vim file1.txt
:tabe file2.txt
:bd (closes file2.txt as well as the tab. I'd still like to retain
this empty tab.)
Well, you could use
:enew
instead of
:bd
or, if there's some extra aspect of ":bd" that you really do
need, you can use something like
:new | wincmd p | bd
(that might have to be escaped as
:new | exec 'wincmd p' | bd
in case pipes-following-wincmd cause problems)
This could easily be put into a command/mapping to make it a
button/command away.
-tim