show bom and fileencoding on vim statuline

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

~/.vimrc

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

Ref.

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

About johnpupu

..........
This entry was posted in 有的沒的 and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
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