Tony Mechelynck 写道: > For the meaning of its settings, ":help 'iskeyword'" resends to ":help > 'isfname'" where it is said: > >> Multi-byte characters 256 and above are always included, only the >> characters up to 255 are specified with this option. >> For UTF-8 the characters 0xa0 to 0xff are included as well. > > IOW it is not possible to treat some hanzi as 'iskeyword' characters and > others not. I think the above means that even the "ideographic > full-width space" U+3000 is treated as a keyword character, OTOH I > wouldn't affirm this without an experiment (maybe Vim with +multi_byte > knows about the main divisions of the Unicode codepoint range).
This seems to hint vim is not using the standard iswalpha(), iswpunct() series widechar-type-check functions in <wctypes.h>. As far as I know the iswalpha() returns true only on true hanzi characters and will not return true on characters such as "ideographic full-width space". I guess this is a choice for efficiency if vim uses utf-8 internally, since utf-8 must be converted to ucs in order to use wctypes. If that is the case, making iskeyword supports multibyte character isn't hard (I had done similar things for Lua script language), but will sacrifice performance. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
