As the title suggests, how to split the page vertically on startup with .vimrc?
If you want a vertical split when vim starts up, add an autocommand to your .vimrc:
au VimEnter * vsplit
Note that vim will do this for you if you're opening multiple files on the command line: use the -O
switch.
-o[N] Open N windows (default: one for each file)
-O[N] Like -o but split vertically
So you can start vim like this:
$ vim -O MyPage.html MyPage.css
And vim will open with those two files both visible in a vertical split.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With