Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用vim的nginx文件中的单词边界错误_Vim_Vim Syntax Highlighting - Fatal编程技术网

使用vim的nginx文件中的单词边界错误

使用vim的nginx文件中的单词边界错误,vim,vim-syntax-highlighting,Vim,Vim Syntax Highlighting,我正在使用nginx语法文件和来自的vim。每当我编辑类型为nginx的文件时,我会得到奇怪的单词边界。例如,如果我有这一行: root /www/www.some-example.com/htdocs/www; ^ ^ ^ 然后按w,光标跳到^指示的位置。我宁愿希望是这样 root /www/www.some-example.com/htdocs/www; ^ ^ ^ ^ ^ ^ ^ ^ 这是我在非nginx文件

我正在使用nginx语法文件和来自的vim。每当我编辑类型为
nginx
的文件时,我会得到奇怪的单词边界。例如,如果我有这一行:

root /www/www.some-example.com/htdocs/www;
^    ^             ^
然后按
w
,光标跳到
^
指示的位置。我宁愿希望是这样

root /www/www.some-example.com/htdocs/www;
^     ^   ^   ^    ^       ^   ^      ^
这是我在非nginx文件中得到的

我的
iskeyword
是:

iskeyword=@,48-57,_,192-255,.,/,:

从语法文件中,我找不到该行为将在何处更改。那么如何解决这个问题呢?

您的
'iskeyword'
在第8、9和10行的语法脚本中发生了更改:

setlocal iskeyword+=.
setlocal iskeyword+=/
setlocal iskeyword+=:

请将这三行注释掉,以解决您的问题。

Oops,的确如此。完全错过了。我想知道这背后的想法是什么。