Is there a command in Vim/gVim to combine two or more tabs into a single split window?

Lots of handwork but...

:tabnew
:buffers "note the numbers
:split
:bn " where n is the number of 
<CTRL-W><CTRL-W>
:bn " for the other file
:tabonly " not necessary, closes every other tab

Or you can create a function for it which asks for buffer numbers, then creates the tab, and closes every other tab (for the opened files)...


There are a couple of functions published on the “Move current window between tabs” page in Vim Tips Wiki that should do what you want, or be easily modifiable to get exactly what you want.

Tags:

Vim

Split

Tabbed