tips_and_howtos:vim_plugin_install

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 from your package repository.

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

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.

Add plugin URLs to .vimrc as stated above, launch Vim and enter a command :

:PlugInstall

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

Exit Vim and continue your work with your new plugin.. and see syntax errors get highlighted ;)

  • tips_and_howtos/vim_plugin_install.txt
  • Last modified: 2021/10/24 13:51
  • by 127.0.0.1