Questions tagged [multibyte]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

convert byte index to character index

Some function in vim return a byte index instead of a character index (e.g. match()). If the matched string contains multibyte characters this byte index differs from the character index. Does vim ...
user avatar
  • 545
0 votes
1 answer
119 views

Get visually selected text - weird behavior when last selected char is multi-byte

I have made a simple function to echo the visually selected text. The function is simplistic as I am only interested in max one-line selection. The problem is, if the last character of the visual ...
user avatar
  • 235
1 vote
3 answers
386 views

Easy way to get character before cursor character in insert mode?

I am trying to write a function for insert mode mapping in which I want to get the character before the cursor character. For texts that are purely ASCII, this is easy, since its byte index is the ...
user avatar
  • 830
0 votes
1 answer
213 views

neovim switch keymapping

I am in the process of getting myself to start using neovim instead of vim/vi which has been favorite editor for over 30 years. For my current use, I need to set keymapping to type characters that ...
user avatar
  • 13
4 votes
0 answers
93 views

Space Error when typing Korean

when typing Korean, I quite frequently have a space error, and it seems happening randomly. Suppose I am trying to write a sentence "I do not know" in Korean. When I hit the space key after 'not' to ...
user avatar
  • 41
5 votes
2 answers
549 views

Reliably get the character at a byte index in a string

I'm doing some string processing in vimscript. I obtained a byte index for a character in the string and now want to obtain the character at that byte index. For single-byte charsets (like latin1) ...
user avatar
  • 8,510
0 votes
1 answer
59 views

Why does backslash-escaping a CJK character cause a very-magic regex match to fail?

My understanding of very-magic regexes is that you can escape any character outside [A-Za-z0-9_] with a backslash to make it match literally. However, I don't see that behaviour with CJK characters. ...
user avatar
  • 894
2 votes
1 answer
1k views

How can I search for Unicode characters by hex code in very magic regexes in vimscript?

I am working on UTF-8 support for my editorconfig-core vimscript plugin. I have hit a strange snag. This is in official GVim 7.4 Win32. I would like to get this working on 7.4, rather than ...
user avatar
  • 894