Is there a command in Vim/gVim to combine two or more tabs into a single split window?
문제
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
해결책
Here are a couple of functions that should do what you want, or be easily modifiable to get exactly what you want:
다른 팁
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)...
Try this script:
TabMerge http://www.vim.org/scripts/script.php?script_id=1961
This one worked for me: TabMerge
If you're working with Plug, just add the following to your ~/.vimrc:
Plug 'vim-scripts/Tabmerge'