Welcome to End Point’s blog

Ongoing observations by End Point people

vim-airline: A lightweight status/tabline for Vim

My standard Vim configuration makes use of around 30 different plugins and I consider vim-airline to be one of the most indispensable because of its built-in functionality and superb integration with a variety of other Vim plugins. It's a great starting point for anyone looking to extend their Vim setup with additional plugins.

I became interested in vim-airline the first time I saw screenshots of it; the color schemes, custom glyphs[1] and indicators immediately revealed value beyond the basic status bar that a stock Vim installation provides. After installing and spending some time using vim-airline I discovered additional benefits due to its integration with other plugins such as Fugitive, Syntastic and CtrlP. vim-airline provides a common platform for integrating the display indicators of plugins from various authors into one view and presents them all with consistent a consistent style.

A quick comparison of Vim with vim-airline installed:

vs. a standard Vim installation:

reveals new indicators for the current Vim mode, git branch, open buffers, and line endings. Integrating other plugins can add additional indicators for syntax errors, trailing whitespace, and more.

Using vim-airline also helped me adopt the usage of built-in Vim functionality that I had previously overlooked. I had not used Vim's tab features, favoring a single split window, but after enabling vim-airline's tabline feature I am now in the habit of using a combination of tabs and split windows to organize my workspace and have found that I am more easily able to keep track of multiple files at a time.

I recommend reading through the documentation for vim-airline, trying it out and then installing some of the other plugins that it integrates with in order to develop your own preferred set of Vim plugins. I spend most of my workday in a Vim session and consider it a good investment to research different plugins and features that can increase productivity and developer happiness.

[1] Note that some of the nice-looking but non-standard characters available in vim-airline require the use of a patched font; pre-patched versions of many popular monospaced fonts are available in the powerline-fonts repository on GitHub and are easy to install (I'm a fan of Adobe's Source Code Pro font).

No comments: