-
Notifications
You must be signed in to change notification settings - Fork 1
Airline
Airline is a plugin for Vim used to show a list of open buffers and other useful information especially if a file is part of a Github project. It is often used in conjunction with other Vim plugins and especially the SPF13-Vim plugin suite.
Airline is the lightweight version of Powerline. It's just as good, it just doesn't require Python like Powerline does.
Despite all of SPF13-Vim's flaws, I still support using SPF13-Vim as a means to get Airline. I have another page for dealing with SPF-Vim's flaws later.
When you install SPF-Vim , the vim-airline directory should be in the ~/.vim/bundle/ directory. However, the fonts that make the stylish chevrons are not installed, so you MUST install the Powerline Fonts and set your Terminal's font to a font that ends with "for Powerline" in its name, otherwise the characters will not process properly. For my preference, I have it set up for Liberation Mono for Powerline size 10. Although Droid Sans Mono for Powerline is good too. URXVT users can change the font by adding these lines to your .Xdefaults or .XResources file.
URxvt*font: xft:Liberation Mono for Powerline:size=10
URxvt*boldFont: xft:Liberation Mono for Powerline:bold:size=10
URxvt*italicFont: xft:Liberation Mono for Powerline:italic:autohint=true:size=10
URxvt*boldItalicFont: xft:Liberation Mono for Powerline:bold:italic:autohint=true:size=10According to the Airline README.md, putting g:airline_powerline_fonts = 1 in .vimrc should automatically populate the g:airline_symbols dictionary with the Powerline symbols and chevrons. However, this does not work for me. Probably because if you use SPF13-Vim, you can't edit ~/.vimrc but must edit ~/.vimrc.local.
Thus, adding these lines to ~/.vimrc.local should make things pretty. If they look weird on this page, they will look better in your terminal assuming you've installed the Powerline fonts.
" Setting this variable to 1 really doesn't make a difference. So you can comment this line out.
" let g:airline_powerline_fonts=1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''With all that done, all there is left to do is save those files, update your ~/.Xresources (if you used that instead of ~/.Xdefaults) and open a new terminal.
There are ways to apply the Powerline style to applications like IRSSI and Tmux but I'll get back to that later.
- Airline on Github - the lightweight version of Powerline
- Powerline on Github - Don't download this.
- Powerline Fonts on Github - But do download these fonts!
- irssi-powerline a Github project that is supposed to make IRSSI look like it is using the powerline theme.
- tmux-powerline a Github project that is supposed to make Tmux look like it is using the powerline theme. The readme says it's depreciated, but erikw updated it within the past month so it is very much alive. Lots of great features.