How can you switch your to current windows from horizontal split to vertical split and vice versa in Vim?
I did that a moment ago by accident but I cannot find the key again.
How can you switch your to current windows from horizontal split to vertical split and vice versa in Vim?
I did that a moment ago by accident but I cannot find the key again.
If you have two windows open, you can quit one of them with :q
.
Looking in /usr/share/vim/vim72/doc/index.txt.gz I only find a reference to
|CTRL-W_v| CTRL-W v
split current window vertically, new window N lines wide
but no corresponding horizontal split.
Vim mailing list says:
To change two vertically split windows to horizonally split
^Wt^WK
Horizontally to vertically:
^Wt^WH
where ^W means "hit Ctrl-W". Explanations:
^Wt makes the first (topleft) window current ^WK moves the current window to full-width at the very top ^WH moves the current window to full-height at far left
Note that the t is lowercase, and the K and H are uppercase.
Also, with only two windows, it seems like you can drop the ^Wt
part because if you're already in one of only two windows, what's the point of making it current?