Home > vim > Installing vim-airline

Installing vim-airline

Decided to try out vim-airline. So I had to find out how to install it and ended up installing some other plugins as well, as they looked like nice features to have.

1. Install Pathogen. This is a popular vim plugin manager.

mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

2. Install vim-airline

git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline

3. Install vim-airline-themes
For different vim-airline themes.

git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes

3. Update your ~/.vimrc with the following settings.

$ less vimrc
" To update the status line, so that you have the colourful status bar. If it is not set you will not see any change when you start up vim.
" Set a status line
set laststatus=2

" Set encoding so that your fonts look okay.
set encoding=utf-8

execute pathogen#infect()
filetype plugin indent on

" Enable powerline fonts
let g:airline_powerline_fonts = 1

Here is how it looks when your encoding is wrong.

And when you set the encoding.

4. Install vim-fugitive
If you want to be able to see the git branch that you are working in

git clone git://github.com/tpope/vim-fugitive.git ~/.vim/bundle/vim-fugitive

5. Install powerline fonts

cd ~/.vim
git clone https://github.com/powerline/fonts.git
cd fonts/

Thats it.

Everything is going into ~/.vim/bundle which is created in the first step.

If the arrows or symbols look misaligned (either too big or too small), try to increase or decrease the size of the font you are using on the terminal window. You can do that in the terminal settings.

Changing fonts

I have the 12pt Monaco font as well as the 12pt Non ASCII Sauce Code Powerline font. Have something similar to avoid any headaches.


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: