The vim * star / asterisk search (:help star) is a great feature which lets you find the next occurrence of the word the cursor is over. Unfortunately it treats dollar-prefixes as part of the string, so if I press * while over the "SearchTerm" in the class name it finds "SearchTerm" in the comment, and "$this->SearchTerm", but not "$SearchTerm":
class SearchTerm
{
/* do something with SearchTerm */
var $SearchTerm;
function DoStuff()
{
return $this->SearchTerm;
}
}
Is there a way of telling star search to ignore the $-prefix?
Just to expand on Haes answer:
I needed to remove $ from iskeyword
:set iskeyword # iskeyword=@,48-57,_,192-255,$
:set iskeyword-=$ # remove the $ as an acceptable word character