vimtricks.wiki Concise Vim tricks, one at a time.

How do I get an enhanced status line with vim-airline?

Answer

Plug 'vim-airline/vim-airline'

Explanation

vim-airline provides a beautiful, feature-rich status line that shows file info, git branch, diagnostics, and more with minimal configuration.

How it works

  • Install the plugin and the status line is enhanced automatically
  • Shows mode, filename, file type, encoding, position, and more
  • Integrates with other plugins (fugitive, ALE, coc.nvim)
  • Themes can be changed with airline themes

Example

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
let g:airline_theme = 'molokai'

Tips

  • Install: Plug 'vim-airline/vim-airline'
  • let g:airline#extensions#tabline#enabled = 1 shows buffer tabs at top
  • Powerline fonts give the best visual appearance
  • Alternatives: lightline.vim (lighter weight), lualine.nvim (Neovim)
  • :AirlineTheme <Tab> previews available themes

Next

How do you yank a single word into a named register?