Wednesday, September 26, 2012

character in statusline

character in statusline

I have added both decimal and hex representations
of the char under the cursor to my statusline as follows:
set statusline+=%b\ " decimal byte '98'
set statusline+=x%02B " hex byte 'x62'

I do NOT need this, but was curious how to show the char itself.
The following does NOT work:
set statusline+=\"%{nr2char(%b)}\" " char as "c"

For testing I used a static value "c"=99 and it works.
set statusline+=\"%{nr2char(99)}\" " char as "c"

How to get %b to evaluate?
Or is there a simpler way?

Bill

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment