
It is known that the status bar in Vim can be easily customized according to your wishes: display information about the current file, the cursor position, the current vcs-branch. There are also separate plugins that completely replace the status line, the most used of which is vim-powerline. In this article I want to introduce you to one of these plugins, vim-airline, which I recently use instead of vim-powerline.
Vim-airline is a lightweight plugin that replaces the status bar in Vim with many options for customization. Got its name due to the fact that the first version of the author wrote, flying in an airplane. Installing the plugin does not cause any problems - you can install it as usual by copying, or through any of the package managers: vundle, pathogen, neobundle. Airline is integrated with many of the most popular plugins: vim-bufferline, fugitive, unite, ctrlp, minibufexpl, gundo, undotree, nerdtree, tagbar, syntastic, lawrencium.
Advantages over vim-powerline above:
- better boot performance
- more customization options
- less problems with fonts
- Easy to create your own theme, for example, one of the standard: dark
Customization
Ask a topic:
let g:airline_theme='dark'
Change theme while working:
:AirlineTheme dark
Enable / disable integration with third-party plug-ins:
let g:airline_enable_fugitive=1 let g:airline_enable_syntastic=1 let g:airline_enable_bufferline=1
Replacing characters:
let g:airline_left_sep = '' let g:airline_right_sep = '' let g:airline_linecolumn_prefix = '¶ ' let g:airline_fugitive_prefix = '⎇ ' let g:airline_paste_symbol = 'ρ'
Replacing individual sections:
let g:airline_section_c = '%t'
(a, b, c - sections on the left, x, y, z - on the right)
')
Additional links
1. vim-airline
github.com/bling/vim-airline2. vim-powerline
github.com/Lokaltog/vim-powerline