Vim语法文件:将某些字符添加到iskeyword isn';行不通

Vim语法文件:将某些字符添加到iskeyword isn';行不通,vim,unicode,Vim,Unicode,我正在制作一个Vim语法文件,需要向iskeyword选项添加一些字符。我很难从Vim帮助文件中弄清楚它是如何工作的,但我现在写的是: set iskeyword+=_,.,-,64,133,!,?,@,172,8743,8744,8853,8592,8593,8594,8595,8596 #64和#133是at符号和省略号。最后几个字符是——,∧, ∨, ⊕, →, ←, ↓, ↑, 及↔. 在所有这些字符中,只有、、-、和(#172)似乎被识别为关键字字符 我还有别的事要做吗?或者Vim只

我正在制作一个Vim语法文件,需要向iskeyword选项添加一些字符。我很难从Vim帮助文件中弄清楚它是如何工作的,但我现在写的是:

set iskeyword+=_,.,-,64,133,!,?,@,172,8743,8744,8853,8592,8593,8594,8595,8596
#64和#133是at符号和省略号。最后几个字符是——,∧, ∨, ⊕, →, ←, ↓, ↑, 及↔.

在所有这些字符中,只有、、-、和(#172)似乎被识别为关键字字符

我还有别的事要做吗?或者Vim只是不支持Unicode中超过某一点的关键字字符(但是at符号也不能被识别,而且肯定在ASCII中)


谢谢你的帮助

关于
iskeyword
的帮助指向关于
isfname
的帮助,它回答了您的所有问题:

[…]
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.
[…]
The format of this option is a list of parts, separated with commas.
Each part can be a single character number or a range.  A range is two
character numbers with '-' in between.  A character number can be a
decimal number between 0 and 255 or the ASCII character itself (does
not work for digits).  Example:
[…]
If the character is '@', all characters where isalpha() returns TRUE
are included.  Normally these are the characters a to z and A to Z,
plus accented characters.  To include '@' itself use "@-@".  Examples:
    "@,^a-z"    All alphabetic characters, excluding lower
            case ASCII letters.
    "a-z,A-Z,@-@"   All letters plus the '@' character.
[…]
  • “此选项仅指定255个字符。”
  • “字符数可以是介于0和255之间的十进制数”
  • 要包含“@”本身,请使用“@-@”

  • iskeyword
    中包含多字节字符已经在许多列表中进行了讨论,例如。

    这是否解决了这个问题?“多字节字符256及以上总是包含”如果是这样,那么为什么会有人要求添加“∧, ∨, ⊕, →, ←, ↓, ↑, 及↔" ? 这是vim中的一个bug吗?@Cogwheel不是bug,而是用法。它们总是包含在文件名识别中。这里的第一段来自
    'isfname'
    iskeyword
    使用了与前一段相同的格式,这就是为什么帮助会重定向到那里。但是请注意,这里的第二段指出“该字符可以是介于0和255之间的十进制数字。原始问题中不是这种情况。数字超过255,因此无法识别。没有正式的方法来处理此问题。我的答案中链接的邮件列表包含更多信息。我希望这对您有所帮助!