How to open multiple files in split windows?

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

How to open multiple files in split windows?

Peng Yu
Hi,

gvim a b

The above command will open a and b. But only one file will be show at
one time. How to show them in to split windows?

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

Re: How to open multiple files in split windows?

Tim Chase-2
> gvim a b
>
> The above command will open a and b. But only one file will be show at
> one time. How to show them in to split windows?


gvim -o a b

or, if you only want 3 windows, for N files (where N>3), you can use

gvim -o 3 a b c d e f g h


More info at

        :help -o

-tim




Reply | Threaded
Open this post in threaded view
|

Re: How to open multiple files in split windows?

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

> gvim a b
>
> The above command will open a and b. But only one file will be show at
> one time. How to show them in to split windows?

Tim already showed how to open the two files in split windows by
modifying the command above.

However, if one has already typed  "gvim a b" and then wants them all in
separate split windows:

  :sba

will do the trick.  This produces horizontally split windows.  If you
want vertically split ones:

  :vert sba

is what you want.

Regards,
Chip Campbell