2

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

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.