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

StackOverflow https://stackoverflow.com/questions/4615856

  •  26-09-2019
  •  | 
  •  

문제

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:

Move_current_window_between_tabs

다른 팁

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)...

This one worked for me: TabMerge

If you're working with Plug, just add the following to your ~/.vimrc:

Plug 'vim-scripts/Tabmerge'

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top