I know that using a command like:
:%bdelete
Using this command I can close all buffers, in all tabs, what I'd like to do is to close all buffers open in the current tab, is that possible?
Usage:
What I'd like to do, is to open ViM and load :VSTreeExplorer
and then open related files in the same window switching between them using :next
and :previous
and then open other files a new tab (with VSTreeExplorer as well), when I need to clean one of the tabs, I would like to use whatever command that closes buffers in the current tab.
For now, what I do is use :%bd
and then open the VSTreeExplorer and start over...
Thanks
I use a variant of your solution: :%bd<CR><C-O>:bd#<CR> This will delete all buffers, then use <C-O> to get restore the position in the current file, then :bd# to remove the unamed buffer. This closes all buffers and leaves you in the same location in the file.
Remap :tabclose to QA This plugin will allow you to keep your abbreviations in the context of a : command. Once this plugin is loaded add the following to your vimrc to create a user command for QA . Now typing :qa in a tab will close out the tab.
It's possible to suffix a[ll] for a number of Vim command-line commands (i.e. type : when in normal mode), include: :wa - save all tabs / unsaved buffers. :xa / :wqa - save all tabs / unsaved buffers and exit Vim. :qa - exit vim (will warn if unsaved buffers exist)
If you're done with a tab you can just use :tabclose
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With