I really like Fugitive (VIM git wrapper plugin) However I would like to create a script that starts vim and then runs
:Gstatus
immediately. However when I try
vim -c Gstatus
I get an error stating that Gstatus is not an editor command
I really like Fugitive (VIM git wrapper plugin) However I would like to create a script that starts vim and then runs
:Gstatus
immediately. However when I try
vim -c Gstatus
I get an error stating that Gstatus is not an editor command
This works
gvim -c 'Gstatus | wincmd j | hide' .
makes the fugative window full size and hide the directory explorer buffer. Also with the directory buffer hidden when you quit the fugative buffer vim closes
You can do this (assuming you are in the project root dir):
$ vim -c 'view .git/index'
It opens the git index in read-only mode (mimicking the essentials of the :Gstatus command)
As a slight improvement on bradgonesurfing's answer
vim -c 'Gstatus | wincmd o' .
This works even if you have splitbelow
set
Run vim +Git +only
I got here thanks to @jsm3031's answer, which nudged me in the right direction.