How would you syntactically-colored words of a camel in vim?

What vimscript commands could you use for syntactic color words in CamelCase?

+4
source share
1 answer

You can simply use the :match command if you want to highlight words with camelCase:

 :match Error /\C\<[a-z0-9]\+[AZ]\w*\>/ 

If you were to use syntax commands, you first need to decide how you want to work with the existing syntax highlighting for each file type, but this will give you more control - for example, only the corresponding camelCase used in variable names.

+3
source

Source: https://habr.com/ru/post/1338363/


All Articles