Last Updated: February 25, 2016
·
789
· novalore

Switching from vertical to horizontal split in vim

I use vertical split windows all the time in vim (working on a 16:9 laptop I have plenty of horizontal space), but sometimes I need the readibility of horizontal splits.

To switch just type:

Ctrl+W t Ctrl+W K (lowercase t and capital K)

Back to vertical:

Ctrl+W t Ctrl+W H (lowercase t and capital H)


Source: http://www.mail-archive.com/vim@vim.org/msg11206.html

link contains detailed explanation

1 Response
Add your response

To note, Ctrl+w t brings you to the top left screen. You can do Ctrl+w K and Ctrl+w H from any screen with any number of screens. Behaves interestingly when you have both vertical and horizontal screens. If you have more than 2 vertical screens and you hit Ctrl+w H, it will rotate the screen you're on with any screens to the left of that in a queue sort of way. Example, you have screens A B C, you hit Ctrl+w H on screen C, you end up with C A B.

over 1 year ago ·