Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I setup my vim-airline or vim-powerline

People also ask

What is airline vim?

VIM Airlines (legally VIM Avia) was a Russian charter airline headquartered in Moscow based at Domodedovo International Airport. It offered international scheduled and charter operations for both passengers and cargo as well as wet lease services.

How do I install vim Air themes?

If you are using a plugin manager, then the directory containing the themes can be found in vim-airline/autoload/airline/themes . Each theme is contained in a single file with extension . vim here. If you want to add a theme file, just copy it to this directory.

What is Powerline vim?

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.


You didn't use a patched font! Patching means manually adding the six extra symbols to the font at specific places in UTF formatted fonts. If these symbols are not present, you get the ugly placeholder blocks, which you are getting. You can either patch by yourself using fontforge (not easy!) or you can simply download and install a pre-patched font from this page:

https://github.com/Lokaltog/powerline-fonts

Installing a font in Windows is easy: Rightclick and choose Install. Then you set it as usual like this in your _vimrc:

set guifont=Liberation_Mono_for_Powerline:h10 

Linux .vimrc for completeness

set guifont=Liberation\ Mono\ for\ Powerline\ 10 

Then for airline

let g:airline_powerline_fonts = 1

or powerline

let g:Powerline_symbols = 'fancy'

Other settings are merely optional.

Restart and enjoy *line.


If you patch manually, here's a hint I learned painfully: After patching the normal font don't forget to patch the bold and italic fonts as well...


I had a similar issue for vim-airline and I resolved it by reading the help file (:h airline) and scrolling down to the customization section.

Copy the following lines into the .vimrc file.

if !exists('g:airline_symbols')
  let g:airline_symbols = {}
endif

" Unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'

Start a new terminal session and launch Vim.


I had the same the same problem and it was fixed by simply adding the following line to the .vimrc file.

let g:airline_powerline_fonts = 1