Sunday, November 6, 2011

Re: [Suggestion] New functions iskeywordchar(), isfnamechar(), isprintchar(), and isidentchar()

Thanks for the replies!

The problem however isn't solved...

Having obtained the current byte index using col("."), I can't simply add n to/subtract n from the return value of col(".") to find the beginning of the next/previous multi-byte character (the -1 offset is ok because there's a base bias).
I could use col(".") repeatedly but I would have to move the cursor ("normal l" or "normal h") beforehand.
Also, I could write a function that would analyze the UTF-8 header bits ("11110", "1110", "110", or "10") to determine the required position, but I was hoping that there's another (easier) way to accomplish this.

Is there any function that lets me determine the byte position of the beginning of the next/previous multi-byte character? I've seen none in the docs...

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