In gvim editor how to split the editor window horizontally? so that includes two files and can see simultaneously ?
2 Answers
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
Ctrl+W, S (upper case) for horizontal splitting
-
it got splitted but i want two different files to be viewed in splitted windows. Jul 15, 2016 at 4:38
-
-
then to view two different files in the same window by splitting then what should i do? Jul 15, 2016 at 4:51
-
-
1@SruthiChowdavarapu, you execute
:e anotherfilename
in one half of the split. Jul 15, 2016 at 6:38