Pegasi Wiki

This wiki acts as a memo for our own work so why not share them? Feel free to browse and use out notes and leave a note while at it.

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

Edit ~/.vimrc

Set ~/.vimrc to contain following :

call plug#begin('~/.vim/vimplugins')
Plug ''
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 :


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 ;)

 stars  from 0 votes

Leave a comment

Enter your comment:
T C P E᠎ N

  //check if we are running within the DokuWiki environment if (!defined("DOKU_INC")){ die(); } //place the needed HTML source codes BELOW this line