While editing Unicode text, I realized that Vim function col('.')
returns current byte position on the line, not character nor column. So this code doesn't work properly:
let cur_column = col('.')
...
execute "normal! " . cur_column . '|'
It moves the cursor on a wrong forward position every time I'm on a non-ASCII line.
I'm using airline plugin, which shows me a cursor position in statusline, and it uses byte position too. But on vim without any plugins it shows me line, byte-character, so presumably it's possible to get a right position.
You can use another function:
virtcol('.')
which is the screen column of cursor.