Is it possible to take two files that are open in separate tabs in gVim and combine them into one tab with a split/vsplit window? I'd prefer if there was a way to specify which tabs to join, but even something that is the opposite of :tab ball would be good enough.
Thanks
It can be anything. To open more tabs in this instance, you can run the command: $ gvim --servername GVIM --remote-tab file1 file2 file3 ... Save this answer.
To open a new VIM window next to the existing one, press <Ctrl>+<w> then press <v>. You can move to the left window again by pressing <Crtl>+<w> and then pressing <h>. To open a new VIM window on the bottom of the currently selected window, press <Ctrl>+<w> then press <s>.
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.
Try this script:
TabMerge http://www.vim.org/scripts/script.php?script_id=1961
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