While you can manually install, remove and update Vim Plugins, it is a tedious process. There are two well known plugin managers for Vim, Github: Vundle and Github: Vim-Plug. After short reading one both, it seems to me that Vundle is no longer maintained in one hand and Vim-Plug has more appealing features on the other. So, I will for now try Vim-Plug.
Installation instructions are in Github: Vim-Plug README file, you can install it on macOS using
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Please, make sure not to copy this, instead consult the Vim-Plug repo for the updated version.
We can Enable Vim-Plug by adding the following code snippet on the top of .vimrc file
" Plugins will be downloaded under the specified directory. call plug#begin('~/.vim/plugged') " Declare the list of plugins. " Plug 'gitHubRepo/plugin-name' " Plug 'gitHubRepo/plugin-name.vim' " List ends here. Plugins become visible to Vim after this call. call plug#end()
Note that Vim Plugins are qualified by GiHub repository name. In the example above the
Plug instructions are commented out. When you find a plugin you like, just prefix it with
.vimrc and you are good to go.
After adding or removing a
Plug line from the plugins list, reload
:source $MYVIMRC or by restarting vim. Use one of Vim-Plug commands to manage your plugins.
:PlugInstall: Install plugins
:PlugUpdate: Update plugins
:PlugClean: Delete Plugins
ctrlp/ctrlp.vim: Fuzzy finder for Vim, allows you to fuzzy search for a file in current directory. Use
^+pto initiate fuzzy search. Once fuzzy search is open, you can use:
^+k: Move up and down in the result list. Use return for selection.
^+n: Move back and forward on previous searches
tpope/vim-surround: Give vim awareness of things that surround text, such as quotes, braces, brackets and xml tags. It adds a vocabulary
swhich represents surrounding
cs"': change surrounding
tpope/vim-repeat: Expand repeating actions via
.to other plugins such as vim-surround
tpope/vim-commentary: comment stuff out using