Closed commonquail closed 10 years ago
Thanks for the pull! I'll try and review tonight/tomorrow morning. :clock1030:
Awesome & merged.
I could not get the
\@<=
construct to work in the syntax file even though it worked in manual searches. I would have preferred to use that for the preceding\s
in lines 585 and 586.
What is the expression you tried, perhaps I can help? What don't you like about the \s
?
I think it was
syn match phpDocIdentifier "\s\@<=$\h\w*"
with some variations, including the character limit, which seemed to perform as expected in manual searches. The only reason is that it would not include \s
in the capture but that's not terribly important.
I don't think it's working because you are resetting the match start. E.g., Vim expects ____$varName
to match entirely as a phpDocIdentifier
. When using \@<=
this resets the match start to the first non-whitespace character and the matched string is just $varName
. This is not what Vim expected.
To tell Vim it's OK if whitespace wasn't matched, adding skipwhite
after nextgroup
does the trick.
Cheers.
Well. That took a lot longer to find time for than anticipated.
This follows up on #19 by matching only the first identifier, and only if it occurs as the first or second argument and is preceded by at least one whitespace character.
I could not get the
\@<=
construct to work in the syntax file even though it worked in manual searches. I would have preferred to use that for the preceding\s
in lines 585 and 586.