Switch from vim-airline to lightline
Reason
vim-airline is an excellent vim plugin which gives you a fancy status line and makes the coding not that boring. However, recently I found it slowing down the vim start-up time.
I haven’t had this issue before, now it took at least 2 seconds to start the a vim session. I guess one reason may be the /home
directory is NFS-mounted and recently more people are using it.
I suspect the vim-airline plugin because vim is freezing for 1s before airline status bar shows up. Then I disable the plugin, vim starts up in almost no time. It might be too heavy.
Switch to lightline
However, I really like the fancy status bar. After searching, I find 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 and add the new plugin.
1 | " Comment the Old |
Configuration
Actually the default setting is good enough. I just did some simple Configuration.
- Change color scheme
- Show git branch info (need vim-fugtive 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 tabline, but it is too long when you open many files. Then I use vim-bufferline plugin instead.
Result
Vim start-up time is very fast now and I still have a fancy status bar. I am happy with it ^_^.