Saturday, January 25, 2014

Re: Display current column in statusline

> 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 "µ".

In your example it looks like you used a tab char and 'set ts=8'
to move the '5' over. If 'set ts=8' then the '5' IS at column 9,
as it would be if you used spaces.

With vim 7.4.160 using %v all columns with '5' whether using a
tab char or expanded to spaces shows column 9.

" using %v, tab char the '5' and 'µ' are at column 9
123 56789
"äå µåäö"

" using %v, spaces the '5' and 'µ' are at column 9
123 56789
"äå µåäö"

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

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