Like many ViM users, I have been using vim-powerline for a while now. Today I fell down the rabbit hole of updating my ViM settings, and ended up just completely migrating from powerline to vim-airline.

vim-airline is essentially a fork of powerline, but slimmed down and built specifically for ViM. Here's an image of it (from the vim-airline Github readme). You'll note it looks exactly like powerline:

vim-airline

This post is based on my ViM configuration, which I previously posted about.

Should You Switch?

Firstly, vim-powerline is actually deprecated now, and will eventually be replaced by powerline. So, if you are using vim-powerline right now, you will need to change to something else in the future regardless of what it is.

Before trying vim-airline, I actually tried to just use the new powerline software. I followed the new instructions, but I just couldn't get it working. I tried both the python pip install as well as the 'vim-only' install, but neither would work for me.

While I was Googling around, trying to figure out my errors, I started reading more and more about vim-airline. I finally found this post which convinced me to switch.

I'll note, here, that I'm only using 'powerline' for ViM, so I don't care about all of the other software that powerline now provides.

Installing

I use Pathogen, so installing vim-airline was as simple as cloning it into my vim/bundle directory and adding some configuration to my ~/.vimrc. My configuration looks like this:

let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
      let g:airline_symbols = {}
endif
let g:airline_symbols.space = "\ua0"
  let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 0
let g:airline_theme = 'molokai'

Like a lot of people, I struggled with getting the fonts working correctly. It seems like there is a different solution for everyone, but for me, I needed to install the Powerline Patched Fonts using the instructions on the Powerline docs.

Something that tripped me up is that gViM doesn't use all of the configured font paths on your system. My terminal (and so ViM) had no trouble finding the patched fonts in some directories, but gViM couldn't see them at all. It wasn't until I put the fonts in /usr/share/fonts and re-ran fc-cache that gViM could find them.

Enjoy!

The new powerline is looking really slick, but if you only want to use it for ViM, check out vim-airline. If you get stuck, check out the excellent FAQ.