13

I was given a plugin for Vim. It came in something called a .vimball.

  • What am I meant to do with this exactly?
  • Where do I put it?
  • Do I need to be root to install it?

2 Answers 2

15

Simply open the vimball file in Vim and then execute :source %.

It will move the files to their appropriate folders in your ~/.vim directory.

You don't need to be root as it just copies files to your ~/.vim directory. You can delete it after you have sourced the vimball file

1
  • 3
    See also :help vimball for additional vimball-related commands (in vim 7 and up I think).
    – user72
    Feb 6, 2015 at 17:30
8

:UseVimball path instead of :so [name].vba for vim8-packages/dein/vim-plug/minpac

If you use vim8 pack paths or a plugin manager which supports local plugins (e.g. dein or vim-plug), you might want to install a vimball (.vba[.gz]) into a specific directory and not merge it with your ~/.vim directory.

Example: Installation of Vis (Visual Block Cmds) by Charles Campbell (DrChip)

vim8 pack path/minpac

If you use the package feature of vim8 or minpac, ~/.vim/pack/manual/start/vis would be a sensible location. The installation steps would be

$ vim http://www.drchip.org/astronaut/vim/vbafiles/vis.vba.gz
:UseVimball ~/.vim/pack/manual/start/vis

If you use dein or vim-plug, you would install the vimball not in a pack path but one of your choice and would add this plugin with a plugin manager specific line to your $MYVIMRC:

dein

$ vim http://www.drchip.org/astronaut/vim/vbafiles/vis.vba.gz
:UseVimball ~/.vim/dein-manual/vis
dein#add('~/.vim/dein-manual/vis')

vim-plug

$ vim http://www.drchip.org/astronaut/vim/vbafiles/vis.vba.gz
:UseVimball ~/.vim/plugged-manual/vis
Plug '~/.vim/plugged-manual/vis'

Installing new version of a default plugin

However, note that default plugins (e.g. netrw) are sourced before plugins installed into a vim 8 packpath. The source order is:

  1. $HOME/.vim/plugin
  2. $VIM/plugin
  3. $VIMRUNTIME/plugin
  4. $HOME/.vim/pack/*/start/*/plugin

This means installing a newer netrw version into a packpath is not as straightforward as one would think. See for details Vim 8 packages, how do I overwrite a default package?.

1
  • Note, :UseVimball needs that path to exist (e.g. mkdir -p ~/.vim/pack/manual/start/vis) as the vimball code doesn't understand the vim8 package feature and doesn't expect missing parent directories. Worse, the failure is silent.
    – Adam Katz
    Aug 23 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.