To use powerline in VIM, the default plugin
vim-powerline may have been out-of-date. I suggest to use the modern plugin,
vim-airline, which provides amazing status-bar settings and powerline styles. In additional, it has accompanied plugin
vim-airline-themes to allows users to easily adjust powerline styles.
Install Airline via Vundle
If you use other package manager plugins, you may go to https://vimawesome.com/plugin/vim-airline-superman for more information. VimAwesome is a very cool website that lists most popular vim plugins by their popularity.
Setup Powerline font
This is important, since powerline-style status bar uses some special characters/symbols. Go to https://github.com/powerline/fonts, where you can find patched fonts to support powerline. For example, I use
Roboto Mono, so I download and install all
.ttf in the font folder
To allow Vim to use these patched fonts to show symbols in powerline, we need to configure the terminal font (for Vim in terminal) or the font type for GVim.
Vim in Terminal:
iTerm2: change font to
Roboto Mono for Powerline
URxvt: set the font by
~/.Xresources(remember to run
xrdb .Xresourcesbefore running vim)
GVim or MacVim: Adding the configuration of
.vimrc. For Linux, (due to strange bugs or nonuniform legacy ), use
set guifont=Roboto\ Mono\ for\ Powerline\ 15. For MacOX or Windows, use
set guifont=Roboto\ Mono\ for\ Powerline:h15.
More configurations on Airline or Airline themes
You may choose whatever you prefer from the following in my