Вопрос

I'm using the nginx syntax file with vim from here. Whenever I edit files of type nginx i get strange word boundaries. For example, if i have this line:

root /www/www.some-example.com/htdocs/www;
^    ^             ^

And press w, the cursor jumps to the positions indicated by ^. I would rather expect it to be

root /www/www.some-example.com/htdocs/www;
^     ^   ^   ^    ^       ^   ^      ^

which is what i get in non-nginx files.

My iskeyword is:

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

From the syntax file i could not find where this behavior would be changed. So how can this be fixed?

Это было полезно?

Решение

Your 'iskeyword' is changed in that syntax script on line 8, 9 and 10:

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

Comment out these three lines to fix your issue.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top