Switch from vim-airline to lightline
💡 [Update]: Over the past couple of years, I have gradually and fully transitioned to Neovim and its modern Lua plugin ecosystem (such as
lualine.nvim). That said, I still maintain this classic Vim configuration as a reliable fallback/backup whenever I work on a remote machine or server where Neovim is not available.
(Original 2017 notes below)
Reason
vim-airline is an excellent Vim plugin which gives you a fancy status line and makes coding not that boring. However, recently I found it slowing down Vim’s start-up time.
I didn’t have this issue before, but now it takes at least 2 seconds to start a Vim session. I guess one reason may be that the /home directory is NFS-mounted and recently more people are using it.
I suspected the vim-airline plugin because Vim was freezing for 1s before the airline status bar showed up. After I disabled the plugin, Vim started up in almost no time. It might be too heavy.
Switch to lightline
However, I really like the fancy status bar. After searching, I found a very nice alternative - lightline.
Installation
Installation is very simple if you have a plugin manager like vundle or vim-plug. (BTW, I am using vim-plug now.) Just comment out the old one and add the new plugin.
1 | " Comment the Old |
Configuration
Actually, the default settings are good enough. I just did some simple configuration.
- Change color scheme
- Show git branch info (needs the vim-fugitive plugin)
- Use powerline symbols
1 | let g:lightline = { |
- Show tabline and disable the GUI tabline
1 | let g:lightline.tabline = { |
Misc
I managed to show buffers on the tabline, but it gets too long when you open many files. So I used the vim-bufferline plugin instead.
Result
Vim’s start-up time is very fast now and I still have a fancy status bar. I am happy with it ^_^.
Update (2026-11-01): Noted transition to Neovim and modern Lua plugins, while retaining classic Vim setup as fallback.
