How to run a vim command from the shell command-line?

jvc26 picture jvc26 · Oct 11, 2012 · Viewed 20.6k times · Source

There are many stackoverflow questions about running shell programs from within vim. Is it is possible to do the reverse, i.e.,

$ vim :BundleInstall

to allow me to run BundleInstall as part of a shell script, rather than having to open vim and run it manually?

Answer

jvc26 picture jvc26 · Oct 11, 2012

Note, now the syntax has changed, and the line should read (As per @sheharyar):

vim +PluginInstall +qall

For posterity, previously, the correct line was:

vim +BundleInstall +qall

Should anyone other than me be looking! Note: this is in the Github README for vundle.