views:

69

answers:

2

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.

+1  A: 

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
Al
A: 

Having seen this solution I decided to hide the messiness in a script that always should have existed, vim-install: http://github.com/robertmassaioli/vim-install

Robert Massaioli