Nowax
Nowax

Reputation: 347

Highlight function name in Vim

I've tried to set highlight syntax pattern in my syntax file for vim, but I've failed. Is there an eny option to match function's name when we assume that every function's name starts with "f_" and ends with "("?

I've already tried something like this: syn match abcFunc /f_*/, but it has highlighted only "f" or "f_"... Any ideas?

Upvotes: 0

Views: 643

Answers (1)

Kent
Kent

Reputation: 195029

try this:

syn match Function /\<f_[^(]*(/he=e-1

Upvotes: 2

Related Questions