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?

1 Answer 1


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! Commented Apr 26, 2016 at 9:45
  • I'm trying this right now. And it seems to be case sensitive for neovim. Commented Mar 12, 2022 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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