Skip to content

Guide · Open source

How to use vim-airline: install, configure and tips

Updated · written with AI from the project's own documentation and checked against our catalogue data

vim-airline is a plugin for the Vim text editor that adds a status line at the bottom of each window and a tab line at the top. This guide is for Vim users who want more context while editing, including people who are new to plugins. After reading it you will be able to install vim-airline, understand what each section of the status line shows, and turn on the tab line.

vim-airlinevim-airline/vim-airline · ★ 18k · MIT

Quick start

  1. 1Check your Vim version. Confirm you are running Vim 7.2 or newer, the minimum the README lists.
  2. 2Add the plugin line. Add the Vundle, Plug or other line from the README to your vimrc.
  3. 3Install with your manager. Run your plugin manager's install step, or clone the repository into ~/.vim/bundle/vim-airline for Pathogen.
  4. 4Generate help tags. If you used Pathogen or the pack feature, run :Helptags or :helptags on the plugin's doc directory as the README describes.
  5. 5Restart Vim and check the status line. Open Vim and look for the status line at the bottom of each window.
  6. 6Enable the tab line if wanted. Add the tabline enabled setting to your vimrc to show buffers when only one tab is open.
  7. 7Adjust sections or themes. Change the separators or formatter, or install vim-airline-themes for a color scheme.

Install vim-airline with a plugin manager

vim-airline follows the standard Vim runtime path structure, so it works with several plugin managers. The README lists Pathogen, NeoBundle, Vundle, Plug, VAM, Dein, minpac, the native Vim 8 package feature, and a manual copy of the files into your ~/.vim directory.

The README gives these examples. Add the matching line to your vimrc, then install with your manager. The minimum supported Vim version listed in the README is 7.2.

  • Vundle: add Plugin 'vim-airline/vim-airline' to your vimrc
  • Plug: add Plug 'vim-airline/vim-airline' to your vimrc
  • Pathogen: clone the repository into your bundle directory, then run :Helptags to generate help tags
git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline

Read the status line sections

The status line is the colored line at the bottom of each window. It is split into sections, and each one shows a different piece of information. The README labels them A, B, C, X, Y and Z, and some sections can be colored differently depending on conditions such as the mode or whether the file is modified.

Section Z shows your position in the file. For example, '10% ☰ 10/100 ln : 20' means 10 percent down the file, on line 10 of 100, at column 20.

  • A: the mode, with extra flags such as crypt, spell or paste (for example INSERT)
  • B: environment status, such as VCS information like the branch and hunk summary
  • C: the filename and read-only flag
  • X: the filetype
  • Y: file encoding and fileformat
  • Z: current position in the file
  • Other sections can show warnings, errors or statistics from external plugins such as YCM or syntastic

Turn on the smarter tab line

The tab line sits at the top of the screen. By default the README says the smarter tab line is disabled. It can show all open buffers when only one tab is open. To enable it, add the setting below to your vimrc.

You can also choose a path formatter with the formatter field. The README lists default, jsformatter, unique_tail and unique_tail_improved. The formatter affects how file paths appear in each tab and in the current buffer indicator in the upper right.

let g:airline#extensions#tabline#enabled = 1

Customize the tab line separators and formatter

Separators can be set independently for the tab line. The README shows how to make straight tabs by setting the left separator to a space and the alternate separator to a vertical bar.

Set the formatter in your vimrc the same way as the enable setting.

let g:airline#extensions#tabline#left_sep = ' ' let g:airline#extensions#tabline#left_alt_sep = '|' let g:airline#extensions#tabline#formatter = 'default'

Change the defaults and themes

If you do not like the default sections, the README says you can replace them with standard Vim statusline syntax. This lets you rebuild a statusline you already use.

Themes are no longer in the main repository. The README says they moved to vim-airline-themes, which you install the same way as the plugin. Themes cover popular color schemes such as solarized, tomorrow, base16, molokai and jellybeans.

  • Install the themes plugin alongside vim-airline, as in the README Vundle example
  • See the vim-airline-themes repository for available themes
Plugin 'vim-airline/vim-airline' Plugin 'vim-airline/vim-airline-themes'

Use integrations with other plugins

vim-airline includes extensions for several plugins, including ctrlp, unite, denite, tagbar, csv.vim and syntastic. The README says these extensions load only when the matching plugin is installed, and you can turn them off.

The README also lists hunk indicators from git plugins such as vim-gitgutter, vim-signify, coc-git and gitsigns.nvim.

  • Extensions load lazily and only if the other plugin is installed
  • Each extension can be disabled if you do not want it

What people use it for

  • See the mode, filename, filetype and cursor position at a glance while editing
  • Show git branch and hunk information in the status line when using vim-gitgutter or gitsigns.nvim
  • Switch between open buffers using the tab line
  • Show warnings and errors from syntastic in the status bar
  • Match the status bar to a color scheme such as solarized or base16 by installing vim-airline-themes

Frequently asked questions

Is vim-airline free?

vim-airline is released under the MIT licence, according to the project information. The MIT licence allows use, modification and distribution, subject to its terms.

Does vim-airline work with Neovim?

The source describes vim-airline as a plugin for Vim. The README does not describe Neovim support, so check the project documentation before relying on it there.

What is the minimum Vim version for vim-airline?

The README lists 7.2 as the minimum supported Vim version. Newer features may need a more recent version of Vim.

How do I install vim-airline?

Add the matching line for your plugin manager to your vimrc, such as Plugin 'vim-airline/vim-airline' for Vundle or Plug 'vim-airline/vim-airline' for Plug, then run the install step. With Pathogen, clone the repository into ~/.vim/bundle/vim-airline.

How do I turn on the tab line in vim-airline?

Add let g:airline#extensions#tabline#enabled = 1 to your vimrc. The README says the smarter tab line is disabled by default, and this setting turns it on.

What are the alternatives to vim-airline?

The project lists lightline.vim, vim-powerline and vim-statusline as comparable projects. Pick the one whose defaults and configuration style suit you.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

vim-airline suits Vim users who want a clearer status bar and tab line, and who are comfortable with some configuration. It is less suited to people who want a fully styled IDE-like interface out of the box, or who use Vim versions older than 7.2. If you do not use Vim or Neovim, this plugin is not for you.

Install options & downloads