Reputation: 45632
What vimscript command(s) could you use to syntax-color words in CamelCase?
Upvotes: 4
Views: 326
Reputation: 91028
You can just use the :match
command if you want to highlight words with camelCase:
:match Error /\C\<[a-z0-9]\+[A-Z]\w*\>/
If you were to use syntax commands you would first need to decide how you want to work in with the existing syntax highlighting for each filetype, but this would give you more control - e.g., only matching camelCase used in names of variables.
Upvotes: 3