voom is a simplest-thing-that-works tool to manage your Vim plugins. It installs plugins, updates them, and uninstalls them.
It assumes:
- The plugins you use are on GitHub (or in-progress on disk).
- You use Pathogen to manage Vim's runtime path.
voom is an alternative to vim-plug, Vundle, NeoBundle, vam, Vizadry, etc.
Features:
- Fast: plugins are installed in parallel.
- Lightweight (100 lines of bash).
- No git submodules :)
Voom works with both Vim and NeoVim.
Vim users: just follow the instructions below.
NeoVim users: follow the instructions below but:
- replace
~/.vimwith~/.config/nvim - replace
~/.vimrcwith~/.config/nvim/init.vim
Empty your ~/.vim/bundle/ directory and git-ignore everything in bundle/.
$ rm -rf ~/.vim/bundle/*
$ cd ~/.vim && echo 'bundle/' >> .gitignoreCreate it together with the autoload and bundle subdirectories:
$ mkdir -p ~/.vim/{autoload,bundle}$ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vimAdd this to the top of your ~/.vimrc:
execute pathogen#infect()For example, if ~/bin is on your path:
$ curl -LSso ~/bin/voom https://raw.githubusercontent.com/airblade/voom/master/voomNeoVim users: tell voom where your configuration is:
$ alias voom='VIM_DIR=~/.config/nvim voom'$ echo 'airblade/voom' > ~/.vim/plugins
$ voom edit
$ git add ~/.vim/pluginsYou don't need airblade/voom in your manifest – the voom script does all the work – but it makes editing the manifest a little nicer.
You declare your plugins in plugins, a plain-text manifest in your vim repo. Open your manifest with:
$ voom editHere's an example of a manifest:
# Comments start with a hash character.
# Note the plugin declarations are case-sensitive.
# Declare repos on GitHub with: username/repo.
tpope/vim-fugitive
# Declare repos on your file system with the absolute path.
/Users/andy/code/src/vim-gitgutter
Run voom without arguments to install and uninstall plugins as necessary to match your manifest.
To update your (GitHub-hosted) plugins:
$ voom updateIf you just want to update one plugin:
$ voom update vim-fugitiveRestart Vim to pick up changes to your plugins.
When voom installs a plugin:
- GitHub-hosted:
voomclones it [1] into~/.vim/bundle/. - local:
voomsymlinks it into~/.vim/bundle/.
When voom uninstalls a plugin:
- GitHub-hosted:
voomremoves the directory from~/.vim/bundle/. - local:
voomremoves the symlink from~/.vim/bundle/.
[1] voom performs a shallow clone of depth 1. If you subsequently want a repo's full history, do git pull --unshallow.
Installing, updating, and uninstalling plugins simply involves making directory trees available at the appropriate locations on the file system. It's basic command-line stuff involving things like git, ln, rm. A shell script is the natural solution.
All a VimL wrapper would do is call those same shell commands – but with all the problems that come with shelling out from Vim.
In this case the simplest thing that works is a shell script.
Copyright Andrew Stewart. Released under the MIT licence.