Vim essentials: Powerline

I thought it would be nice to start a series of posts on neat tricks and plugins for Vim, called Vim Essentials. I don’t know how often I will do these kind  of posts, but I’ve got a couple in mind already.

This first post I’ll start off with Powerline. A plugin for Vim that gives you a better status bar than the default status bar. Your current mode, filetype and used file format is more clear. See the picture below for an example.

powerline

 

After you download and install Powerline you also need to make sure that your .vimrc/.gvimrc has the following lines:

set laststatus=2   " Always show the statusline
set encoding=utf-8 " Necessary to show Unicode glyphs

Adding these two lines makes sure the status bar is always being shown and the characters used in it can be displayed.

Looking at the screenshots provided by the author of Powerline it should also be possible to display the current Git branch, but I’ve yet to find out how to do so. The version I’ve linked here is deprecated in favor of the Python rewrite, which can be found at https://github.com/Lokaltog/powerline.

Scroll to Top