How to switch between horizontal split and vertical split?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to switch between horizontal split and vertical split?

Peng Yu
Hi,

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

Thanks,
Peng
Reply | Threaded
Open this post in threaded view
|

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

Jean-Rene David-2
* Peng Yu [2007.03.13 12:15]:
> Suppose I have horizontal splited window1 and
> window2, is there any way to change them into
> vertical split and vice versa?

CTRL-W H
CTRL-W J

Note the capital "H" and "J".

--
JR
Reply | Threaded
Open this post in threaded view
|

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

A.J.Mechelynck
In reply to this post by Peng Yu
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!
Reply | Threaded
Open this post in threaded view
|

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

Charles E Campbell Jr
In reply to this post by Peng Yu
Peng Yu wrote:

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

See

http://vim.sourceforge.net/tips/tip.php?tip_id=862  "How to toggle
between all vertical and all horizontal window layout"

Regards,
Chip Campbell