I recommend using vim-plug to manage plugins, it makes it easy to install, update, and remove plugins. There are other plugin managers, but I’ve found vim-plug works best for me.
Install by downloading plug.vim and placing it in your
autoload directory. This directory is dependent on your install, it might be
~/.vim/autoload/ or for Neovim
Add a section to your
.vimrc to specify the plugins to load. The
plug#begin function may also specify what directory to download the plugins to. Here is an example specifying two plugins to use.
call plug#begin('~/.config/plugged') Plug 'fatih/vim-go' Plug 'mhartington/oceanic-next' call plug#end()
The plugins are specified using their Github directory. So, the above
fatih/vim-go plugin refers to the https://github.com/fatih/vim-go repository.
.vimrc with a new or deleted plugin, you need to reload; it is easiest to just quit and restart vim. You can also run
:source % to source your config when you are editing it, personally I prefer quit/restart, it’s less typing.
After reloading, install the plugins using the command:
Remove a Plugin
If you want to delete a plugin:
- Remove the line from your config,
- Quit and restart Vim, and then
:PlugClean. You will be prompted to delete the directory, type
If the above does not work for some reason, you can delete the directory manually from the
:PlugUpdate to update all plugins.
:PlugUpgrade to upgrade
See vim-plug repository for full documentation and features.