如果能够使Gvim的状态条显示更多的信息,而且彩色显示,那是件多惬意的事情,你当然可以使用类似
- set statusline=%<%F%h%m%r%h%w%y\ %{&ff}\ %{strftime(\"%c\",getftime(expand(\"%:p\")))}%=\ lin:%l\,%L\ col:%c%V\ pos:%o\ ascii:%b\ %P
这样的命令,但是使用
XPstatusline能带上颜色,像下面的这个样子,具体提供的信息包括:
bufnumber,只读/已修改flag,文件路径,文件名,文件编码,换行符类型,当前字符码,当前语法类型,高亮名,行号,字符号,列号,百分比,日期时间。
不过有个小问题,使用
XPstatusline插件必须安装grey2插件,其实是需要里面的一些定义而已,把下面这些语句拷贝到你的vimrc里,就OK了
VimL语言:
01 hi StatuslineBufNr cterm=none ctermfg=black ctermbg=cyan gui=none guibg=#840c0c guifg=#ffffff
02 hi StatuslineFlag cterm=none ctermfg=black ctermbg=cyan gui=none guibg=#bc5b4c guifg=#ffffff
03 hi StatuslinePath cterm=none ctermfg=white ctermbg=green gui=none guibg=#8d6c47 guifg=black
04 hi StatuslineFileName cterm=none ctermfg=white ctermbg=blue gui=none guibg=#d59159 guifg=black
05 hi StatuslineFileEnc cterm=none ctermfg=white ctermbg=yellow gui=none guibg=#ffff77 guifg=black
06 hi StatuslineFileType cterm=bold ctermbg=white ctermfg=black gui=none guibg=#acff84 guifg=black
07 hi StatuslineTermEnc cterm=none ctermbg=white ctermfg=yellow gui=none guibg=#77cf77 guifg=black
08 hi StatuslineChar cterm=none ctermbg=white ctermfg=yellow gui=none guibg=#66b06f guifg=black
09 hi StatuslineSyn cterm=none ctermbg=white ctermfg=yellow gui=none guibg=#60af9f guifg=black
10 hi StatuslineRealSyn cterm=none ctermbg=white ctermfg=yellow gui=none guibg=#5881b7 guifg=black
11 hi StatusLine cterm=none ctermbg=white ctermfg=yellow gui=none guibg=#3f4d77 guifg=#729eb0
12 hi StatuslineTime cterm=none ctermfg=black ctermbg=cyan gui=none guibg=#3a406e guifg=#000000
13 hi StatuslineSomething cterm=reverse ctermfg=white ctermbg=darkred gui=none guibg=#c0c0f0 guifg=black
14 hi StatusLineNC gui=none guibg=#304050 guifg=#70a0a0
阅读(2331) | 评论(0) | 转发(1) |