Reputation: 700
Having multiple tabs in vim I've noticed that when I create a new buffer, this buffer stays inside the tab where I create it. Not being an expert at vim
I expected the new buffer to behave like a new chrome window
where I could put more tabs in. Is there a way to have a workspace like this in vim where when I switch buffers vim would show me a new set of tabs?
Thanks in advance!
Upvotes: 1
Views: 205
Reputation: 7998
That isn't how buffers work. Buffers are containers that hold and facilitate interaction with text. To use your Chrome analogy, this is like asking: how can I open new windows in my browser tabs? which of course you can't, beacuse that is not the interface is designed to work.
As I mentioned in the comments: tabs are containers for windows. Windows display buffers. Buffers hold text.
If a higher level of hierarchical abstraction is needed on top of tabs/windows, the best bet1 is probably to just open a new terminal window and start a separate instance of vim. That is even what is suggested here. I personally never use tabs, it's too clunky and I find it easier to flip between terminal sessions, which is second nature since I do that all the time anyway. The mechanics of vim tabs don't have that kind of "portability".
1: actually, the best bet is to close some of the unnecessary documents. If you're at the point where tabs and windows just aren't enough, adding more complexity isn't going to make you more efficient.
Upvotes: 2