Saturday, January 25, 2014

Re: Display current column in statusline

On 1/25/2014 8:45 PM, Marco wrote:
> On 2014–01–25 Reid Thompson wrote:
>
>> set statusline=%t%m%r%h%w\ %{&ff}\ %Y\ dec/hex\ \%03.3b/\%02.2B\
>> line\ %l\ col\ %c%V\ of\ %L\ lines\ %p%%
>> yields
>> .vimrc unix VIM dec/hex 115/73 line 50 col 1 of 634 lines 7%
> This statusline uses %c which operates on bytes instead of
> characters. In my example it displays "5" if the cursor is placed on
> the digit "5", which is correct. But if you move the cursor down one
> line (the column stays the same, it's still five) it displays column
> "9" which is not what I want. The displayed column should be "5" if
> positioned on the "µ".
>
> Marco
>
for me it display both byte and char
when I put the cursor on this char v
"äå µåäö"
^
it shows col 9-5, 9 bytes, 5 chars
[No Name][+] unix dec/hex 181/B5 line 2 col 9-5 of 3 lines 66%

If I put it on the last char in the line, the double quotes, it shows
[No Name][+] unix dec/hex 8>3/0>4 line 2 col 17-9 of 3 lines 66%

17 bytes, 9 chars

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: