0

I'm trying to modify the plugin https://github.com/jaxbot/semantic-highlight.vim to highlight variables of differing case with different colours.

Some example configuration the plugin generates:

execute hi! def _semantic0 guifg=#9CD8F7
execute hi! def _semantic1 guifg=#F5FA1D
execute syn keyword _semantic0 json
execute syn keyword _semantic1 JSON

For the above, both json and JSON are highlighted with the same colour.

Is syntax keyword case insensitive?

2

Apparently it is, from the documentation:

And a keyword with matching case always goes before a keyword with ignoring case.

see: :h syn-define

  • 1
    I just tried the plugin with :syntax off and it worked as expected, must be something elsewhere interfering. Thank you! – Michael Robinson Apr 26 '16 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.