How do I make mvim automatically split the window vertically upon launch?
+3
A:
You can use vim +vsplit
to make vim run :vsplit
after opening.
too much php
2010-09-22 23:02:23
Just to add to this, if you want to open files in vertical splits use vim -O file1 file2.. etc.
Randy Morris
2010-09-22 23:08:45
I'm using macvim and usually launch by `cd` -ing into a directory and running the `mvim` launcher script. I'd like it to open up with two blank vsplits.
Trevor Hartman
2010-09-22 23:21:50
+1
A:
I don't have mvim, but it probably reads ~/.vimrc
, so, try adding this line to your ~/.vimrc
file:
vsplit
Mike Morearty
2010-09-23 00:17:44
I thought of this too, but not sure how it would interact with other ways of starting vim, such as vimdiff.
Roger Pate
2010-09-23 09:08:04
So simple...I was thinking it had to be some autocmd call. This works great, thank you.
Trevor Hartman
2010-09-23 16:12:38