Vim: How to switch back from tabview to vertical split

Viewed 352

I can use Ctrl+W T to switch form vertical split to tabview.

My question is what can I use to switch back to vertical split / horizontal split for all tabs?

2 Answers

I suppose that means to close all tabs except the previous one, and then reopen all windows on that tab.

nnoremap <silent><C-W>U :hide -tabonly <bar> unhide<CR>

This answer may be useful for you.

You can alternatively work with buffers. Do a :ls to find the buffer number of the file you are editing in another tab (it is the number in the first column). Then you can bring the tab to a split by using the :bufdo cmd. For example, to bring file with buffer 4 into a vertical split you would do :4bufdo vs.

This howerver does not close the previous tab.

Related