Home Ask Login Register

Developers Planet

Your answer is one click away!

Anthony Scemama February 2016

OCaml Syntax file for vim : '#' and '*' search

I use Vim as a text editor and when I am in an OCaml source code, if I have something like this:


if I put the cursor somewhere on MyModule and I press the # or the * key, Vim is going to search for MyModule.my_function, but I would like it to search only for MyModule. And if I put the cursor on my_function, I would like it to search only for my_function.

Is there a simple way to do it? I couldn't identify the regexp in the vim syntax file...

Thanks in advance,


dlmeetei February 2016

What does your :set iskeyword? prints. If there is . included.

Please remove it using :set iskeyword-=.

Hope this fixes the issue. If so, You might like to add it in ~/.vimrc

More details at :h iskeyword

Post Status

Asked in February 2016
Viewed 2,363 times
Voted 10
Answered 1 times


Leave an answer

Quote of the day: live life