Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install a vimball from the command line

As this post points out you can install Vimballs using the normal:

vim somevimball.vba
:so %
:q

But if you want to install a from the command line how do you do it? I ran a 'man vim' and it seems like the best "from source install" option was the '-S' option so I tried to install haskellmode with it:

wget 'http://projects.haskell.org/haskellmode-vim/vimfiles/haskellmode-20090430.vba'
vim -S haskellmode-20090430.vba    

and that failed to work. It gave me the following error:

Error detected while processing function vimball#Vimball:
line 10:
(Vimball) The current file does not appear to be a Vimball!
press ENTER or type command to continue

It should be noted that using the first method I was able to successfully install the vimball. I have tried the second method on a few other vimballs and it has failed every time. Is there a way to install a vimball from the command line? It seems like a useful sort of task.

Oh, and I am running the following version of vim:

Version: 2:7.2.330-1ubuntu3

Thanks.

like image 913
Robert Massaioli Avatar asked Jun 16 '10 06:06

Robert Massaioli


1 Answers

Use one of the following commands:

vim -c 'so %' -c 'q' somevimball.vba

or:

vim -c 'so % | q' somevimball.vba

For more information, see:

:help -c
:help :bar
like image 50
DrAl Avatar answered Sep 28 '22 17:09

DrAl