show bom and fileencoding on vim statuline

August 12, 2009

這樣就看得到了…………..
一直覺得自已不會遇到BOM
不過最近遇到了 ….

~/.vimrc
[sourcecode language='text']
set ls=2
set statusline=%<%f\ %h%m%r%=%{\”[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\ \”}%k\ %-14.(%l,%c%V%)\ %P
highlight StatusLine ctermfg=blue ctermbg=black
[/sourcecode]

Ref.

http://vim.wikia.com/wiki/Show_fileencoding_and_bomb_in_the_status_line

tags:
posted in 有的沒的 by johnpupu

Follow comments via the RSS Feed | Leave a comment | Trackback URL

Leave Your Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org