Fandom

Vim Tips Wiki

How to toggle between all vertical and all horizontal window layout

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Tip 862 Printable Monobook Previous Next

created 2005 · complexity intermediate · author Charles E. Campbell, Jr. · version 6.0


Suppose you have three windows in a "horizontal list", like this:

Window1|Window2|Window3

Entering the command:

:windo wincmd K

will change the windows to a "vertical list", like this:

Window1
Window2
Window3

Starting with a "vertical list", entering the command:

:windo wincmd H

will change the windows to a "horizontal list".

Related pluginsEdit

  • twl.vim implements :TWL (toggle window layout) which detects which type of window layout you currently have (vertical or horizontal), and applies the correct command to toggle the layout.

CommentsEdit

Also on Fandom

Random Wiki