Ⅰ. 插件描述
Vim plugin that changes the color of the statusbar of the focused window according with the current mode (normal/insert/replace)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'molok/smartusline'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'molok/smartusline'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'molok/smartusline'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/molok/vim-smartusline
Ⅳ. 文档说明
SmartusLine
SmartusLine is Vim plugin that changes the color of the statusline of the
focused window according with the current mode (normal/insert/replace)
it looks like this:

by default it highlights the filename on your statusline only, you can change
that:
let g:smartusline_string_to_highlight = '(%n) %f '
this is what you see in the picture.
You can also change the default colors of the highlight, the name are
self-explanatory, the defaults are:
let g:smartusline_hi_replace = 'guibg=#e454ba guifg=black ctermbg=magenta ctermfg=black'
let g:smartusline_hi_insert = 'guibg=orange guifg=black ctermbg=58 ctermfg=black'
let g:smartusline_hi_virtual_replace = 'guibg=#e454ba guifg=black ctermbg=magenta ctermfg=black'
let g:smartusline_hi_normal = 'guibg=#95e454 guifg=black ctermbg=lightgreen ctermfg=black'
note: you probably want to set the statusline to never hide, like this:
set laststatus=2
other requirements are:
set nocompatible
syntax on
also the statusline option can't be empty, if you want to use the
default statusline you should set it explicitly in your vimrc, it should be
something like this:
set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
For a more complete documentation, read the help file (:help smartusline)
Enjoy!