Install VIM plugins
This is a quick reminder on how to install Vim plugins with Vim-Plug plugin tool. As an example we install Apache Velocity template syntax plugin to Vim.
Why to do this? Because Vim is an extremely powerful editor and even more so when it is syntax aware. Things like syntax highlighting and indenting are just icing on the cake.
Install Git
Install git from your package repository.
Download plug.vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Edit ~/.vimrc
Set ~/.vimrc to contain following :
call plug#begin('~/.vim/vimplugins') Plug 'https://github.com/lepture/vim-velocity.git' call plug#end()
You can select the directory of your choosing, preferrably not a very typical one to avoid collisions with other plugin managers. You can insert as many plugins as you like using Plug statements.
Install plugins
Add plugin URLs to .vimrc as stated above, launch Vim and enter a command :
:PlugInstall
Other commands
Descriptions of available commands:
- PlugInstall [name ...] [#threads] Install plugins
- PlugUpdate [name ...] [#threads] Install or update plugins
- PlugClean[!] Remove unused directories (bang version will clean without prompt)
- PlugUpgrade Upgrade vim-plug itself
- PlugStatus Check the status of plugins
- PlugDiff Examine changes from the previous update and the pending changes
- PlugSnapshot[!] [output path] Generate script for restoring the current snapshot of the plugins
Restart Vim
Exit Vim and continue your work with your new plugin.. and see syntax errors get highlighted ;)