89

How to install a Vimball plugin (with .vba extension)?

The documentation just says:

install details Edit the vba file and type:

:so %

The vimball documentation says:

All a user needs to do with a vimball is:

vim someplugin.vba
:so %
:q
  • Do I have to write that in normal mode (inside Vim) or in the _vimrc file?
  • Do I have to write the full path of the .vba file?
  • I can't write vim someplugin in normal mode. Do I have to write :vim plugin?
oHo
  • 51,447
  • 27
  • 165
  • 200
alexchenco
  • 53,565
  • 76
  • 241
  • 413

1 Answers1

106

Open the vba file with vim, and type the :source % command right there. The % refers to the current file, so using :source % while having a file open in vim is telling it to run the file in the context of vim, which in the case of vba files, is installing it in the proper directories.

sykora
  • 96,888
  • 11
  • 64
  • 71
  • 3
    Shorter syntax `:so %` – Naveen Jul 24 '13 at 13:09
  • Here's the 'official' doc: http://www.vim.org/scripts/script.php?script_id=1502 on `source *.vba` – go2null Oct 08 '15 at 16:25
  • I wonder if there is a way to plug-ify this so that I can perhaps point my vim at a URL that hosts the Vimball file. Because without that, once I go to another machine, this plugin will be missing, no? I googled, and found this: https://vi.stackexchange.com/a/24832/390 – Steven Lu Nov 09 '20 at 05:04