vim 状态栏 优化
vim ~/.vimrc
添加
" 以下是新增:
" 设置状态栏格式
" statusline
" cf the default statusline: %<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" format markers:
" %< truncation point
" %n buffer number
" %f relative path to file
" %m modified flag [+] (modified), [-] (unmodifiable) or nothing
" %r readonly flag [RO]
" %y filetype [ruby]
" %= split point for left and right justification
" %-35. width specification
" %l current line number
" %L number of lines in buffer
" %c current column number
" %V current virtual column number (-n), if different from %c
" %P percentage through buffer
" %) end of width specification
" set statusline=%<\%F\ %m%r%y%=%0(L\%L\ \ %l,\%c%V\ \ %P%)
set statusline=%<\%F\ %m%r%=%0(%Y\ %l,\%c%V\ \%L\L\ %P%)
或者
set statusline=%<\%m%r\%F\%=%0(%y\ %l,\%c%V\ \%L\L\ %P%)