Change horizontal to vertical splits?

0 views
Skip to first unread message

703designs

unread,
Dec 17, 2008, 2:08:09 PM12/17/08
to vim_use
I generally prefer horizontal splits to vertical splits. Is there a
way to take two open, horizontal splits and show them as verticals
instead?

Gary Johnson

unread,
Dec 17, 2008, 2:14:28 PM12/17/08
to vim...@googlegroups.com

:help CTRL-W_K

and scroll up to the preceding paragraph which introduces that
family of commands.

You can also precede a command that performs a split with ":vert" to
make the split open vertically.

:help :vert

Regards,
Gary

Charles Campbell

unread,
Dec 17, 2008, 2:55:13 PM12/17/08
to vim...@googlegroups.com
Here's how to switch between the two following two layouts:

If you have vertically arranged windows, one atop another:
windo wincmd H

If you have horizontally arranged windows, one beside another:
windo wincmd K

Regards,
Chip Campbell

fritzophrenic

unread,
Dec 18, 2008, 11:14:10 AM12/18/08
to vim_use


On Dec 17, 1:14 pm, Gary Johnson <garyj...@spk.agilent.com> wrote:
>
> You can also precede a command that performs a split with ":vert" to
> make the split open vertically.
>
>    :help :vert
>

It only works in one special case (the :diffsplit command) but also
see :help 'diffopt' where it explains the "vertical" option.

Gary Johnson

unread,
Dec 18, 2008, 11:46:28 AM12/18/08
to vim...@googlegroups.com

Did you really mean to write that :vert _only_ works as a prefix to
:diffsplit? That's not true. It works as a prefix to several
commands including :new, :split, :sfind and :help, to name a few.

Regards,
Gary

Reply all
Reply to author
Forward
0 new messages