gpt4 book ai didi

Vim 语法文件 : Adding certain characters to iskeyword isn't working

转载 作者:行者123 更新时间:2023-12-05 00:04:09 24 4
gpt4 key购买 nike

我正在制作一个 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 中包含多字节字符已经在许多列表中讨论过,比如 this one

    关于Vim 语法文件 : Adding certain characters to iskeyword isn't working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5972135/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com