I am wondering how I can open all of the current buffers in vi(m) in new tabs. I know that you can edit your vimrc file to do something like this, but I'd prefer just to be able to run a command when needed. I can do it manually by chaining the new tab and open buffer commands, such as:
:tabnew | b 1
But I would prefer a more automatic approach.
The way to go is:
:tab sball
From the help:
"sball: Rearrange the screen to open one window for each buffer in the buffer list... When the |:tab| modifier is used new windows are opened in a new tab, up to 'tabpagemax'."
Without the |:tab| modifier, it open each buffer in split view.
:sball
or to open at most 6 of them
:6sball
etc.
you can assign a mapping to this command:
:bufdo tab split
finally, to map this:
map ,bt :bufdo tab split<CR>
greets
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