– open file vertically
vim -O file1 file2
– horizontally
vim -o file1 file2

– open one file in vim, then split for the second file horizontally
:new file2
or
:sp file2
– vertifically
:vsp file2

– horizontally
ctrl + wv and :e file2
– vertically
ctrl + ws and :e file2

Posted in

3 responses to “split windows in vim”

  1. JC Avatar
    JC

    switch file:
    ctrl + ww

    Like

  2. JC Avatar
    JC

    switch file:
    ctrl + ww

    Like

  3. JC Avatar
    JC

    switch file:
    ctrl + ww

    Like

Leave a comment