Saturday, December 26, 2020

Getting the current character position of the cursor

Hi,

The getcurpos() and col() functions return the byte position of the cursor.
Is there a function that returns the character position of the cursor in
the current line?

The byteidx() function returns the byte index given the character index
in a string. I am looking for the opposite.

Thanks,
Yegappan

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAAW7x7nER5%2BrkybiqZ%3Dq4EwaamaAcv59g%2BUfnYx0V%3Dh%3D_ih2jQ%40mail.gmail.com.

No comments:

Post a Comment