3

In gvim editor how to split the editor window horizontally? so that includes two files and can see simultaneously ?

2 Answers 2

5

From command line:

open specified files as horizontal splits

gvim -o report.log power.log area.log

open specified files as vertical splits

gvim -O report.log power.log area.log

Within the editor

open file for editing in new horizontal split screen

:split filename
:sp filename

open file for editing in new vertical split screen

:vsplit filename
:vs filename

Check out :h windows.txt for more help

4

Ctrl+W, S (upper case) for horizontal splitting

5
  • it got splitted but i want two different files to be viewed in splitted windows. Commented Jul 15, 2016 at 4:38
  • you don't, its a shortcut key.
    – HashTables
    Commented Jul 15, 2016 at 4:43
  • then to view two different files in the same window by splitting then what should i do? Commented Jul 15, 2016 at 4:51
  • superuser.com/a/486535/410599
    – HashTables
    Commented Jul 15, 2016 at 5:13
  • 1
    @SruthiChowdavarapu, you execute :e anotherfilename in one half of the split. Commented Jul 15, 2016 at 6:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .