vim horizontal and vertical splits from command line -
i'm trying open 3 files in vim command line. i'd 1 file on left vertical split between , other 2 files, remaining 2 files horizontally split.
| 2 1 |--- | 3
i know can use command vim -o notes.markdown -o plan.markdown
open first 2 files in vertical split , once i'm in can switch second file ctl w
, use command split history.markdown
achieve want, i'd able in 1 line command line.
i tried using command vim -o notes.markdown -o plan.markdown -c split history.markdown
gets close, splits first , second file leaving 3rd on right side of vertical split.
the thing can't figure out if can tell vim use ctl
key command line run ... -c <switchwindowcommand> | split history.markdown
. there way specify control key?
there many ways this; key :wincmd
, lets execute arbitrary window commands.
here, first create 3 vertical splits, , use <c-w>h
move first window full-height vertical split on left:
$ vim -o 1 2 3 -c "wincmd h"
Comments
Post a Comment