vim  

Re: How to switch between horizontal split and vertical split?

A.J.Mechelynck
Tue, 13 Mar 2007 10:05:01 -0800

Peng Yu wrote:
Hi,

Suppose I have horizontal splited window1 and window2, is there any
way to change them into vertical split and vice versa?

Thanks,
Peng


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

see
        :help window-move-cursor
        :help window-moving


Best regards,
Tony.
--
Down with categorical imperative!