Is there an easy way to move an adjacent tab in Vim to current window as a split?
While looking around I reached a mailing list discussion where someone said it's the reverse of the operation Ctrl+W,T without providing the solution.
Simply use vim *. py when opening files (without the -p option that opens them in tabs), and navigate them using :n and :prev (or :N ). You can then split with :vs or :sp and use the Ctrl-W commands to switch and reorganize windows.
To switch to the right window, press “Ctrl + w”, then “l”. To go to the left window, it's “Ctrl + w”, then “h”. If you did a horizontal split, then going up and down is necessary. For going up, press “Ctrl + w”, then “k”.
To directly move to first tab or last tab, you can enter the following in command mode: :tabfirst or :tablast for first or last tab respectively. To move back and forth : :tabn for next tab and :tabp for previous tab. You can list all the open tabs using : :tabs. To open multiple files in tabs: $ vim -p source.
The problem with your problem is that a tab is not tied to a specific buffer. You can have 10 windows with as many buffers in a tab so "moving a tab into a split" doesn't make much sense.
What makes more sense is "show buffer x into a split" which can be done with
:sb <name_of_buffer>
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