I really like Fugitive (VIM git wrapper plugin). However, I would like to create a script that runs vim and then runs
:Gstatus
immediately. However when i try
vim -c Gstatus
I get an error Gstatus is not an editor command
It works
gvim -c 'Gstatus | wincmd j | hide' .
makes a full-screen full-window window and hides the directory explorer buffer. Also, when you hide the directory buffer, when you exit the fjutative buffer, vim closes
You can do this (if you are in the root directory of the project):
$ vim -c 'view .git/index'
It opens the git index in read-only mode (mimics the main command: Gstatus)
As a slight improvement in the response to bradgonsurfing
vim -c 'Gstatus | wincmd o' .
This works even if you installed splitbelow
splitbelow