qstrahl / vim-matchmaker

Highlight matches for the word under the cursor
38 stars 10 forks source link

First word on the line is highlighted even if not under the cursor #6

Closed jordelver closed 11 years ago

jordelver commented 11 years ago

2013-08-08 at 17 11

Is this correct behaviour? I was not expecting the words to be highlighted as the cursor is not over the word.

qstrahl commented 11 years ago

This is because matchmaker's default needle function uses <cword>, defined by Vim as "the word under the cursor". <cword> matches the word after the cursor if there is none directly under it; for the sake of consistency, this is the expected behaviour for Matchmaker.

jordelver commented 11 years ago

Ok, cool. Could we make this configurable somehow? Is it possible?

qstrahl commented 11 years ago

It's possible, but unwelcome; I'd rather be consistent with Vim. Other "wordwise" operations like * and # also exhibit this behaviour.

jordelver commented 11 years ago

Ok, I can appreciate that. Thanks for the plugin :+1:

qstrahl commented 11 years ago

Thanks for the help!