我希望能够搜索带有@符号和gf的单词到具有相同模式的文件,例如foo@bar。
set iskeyword-=@(或者将设置从iskeyword=@,48-57,_,192-255,.更改为iskeyword=48-57,_,192-255,.允许我使用*搜索foo@bar实例,但如果执行set isfname-=@,仍然不能对其进行gf (假设foo@bar是路径中的文件)。
如何使foo@bar成为通用的?
发布于 2017-07-02 09:14:56
如果您有一个名为foo@bar的文件,并且您想编辑它,点击它的路径上的gf,您可以将@字符添加到'isfname'选项中,如下所示:
set isf+=@-@注意,对于'isfname'和'iskeyword'选项,@并不代表@字符,而是表示isalpha()返回true的所有字符。
来自:h 'isf的相关部分
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 "@-@".https://stackoverflow.com/questions/44868898
复制相似问题