A Weird Imagination

Useful vim plugins

Posted in

Vim plugins

The real power of Vim and the other text editor comes not from their complicated key combinations, but their programmability. Vim uses its own language Vim script while Emacs uses a dialect of Lisp called Emacs Lisp. Both have large communities who have authors many plugins.

A great source for Vim plugins is [Vim.org][vim-scipts], which also has a wiki about Vim with additional information on some of the plugins and lots of tips on how to better use Vim.

Plugin managers

While, Vim does have basic support for plugins via .vba files, also known as vimball archives, it's easier to use a plugin manager. I recommend Vundle, which is easy to install and use.

Once you have following the instructions on the Vundle GitHub page to install it, installing a new plugin is as simple as adding a line to your ~/.vimrc file naming the GitHub repository and running :PluginInstall.

Recommended plugins

Rainbow parens

Rainbow parentheses (on Vim.org) is the reason why Vim.org's voting system has a "Life Changing" option, at least for anyone who has ever coded in Lisp or another language that uses a lot of parentheses.1 It recolors parentheses so all parentheses at different nesting levels are different colors, making it much easier to figure out which parentheses are matching.

Using Vundle, the installation guide says to include the following in your ~/.vimrc file:

Plugin 'luochen1990/rainbow'
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle

Syntax checking

Syntastic is a Vim plugin for calling syntax checkers. This includes the errors and warnings of most compilers and linters like Shellcheck. The recommended settings put a pane at the bottom of the window showing errors that can be double-clicked on to jump to the location, just like you would expect in an IDE.

  1. I'm exaggerating, but I do think it qualifies as "Life Changing". 


Have something to add? Post a comment by sending an email to comments@aweirdimagination.net. You may use Markdown for formatting.

There are no comments yet.