How do I highlight operators/parentheses/brackets/etc. in VIM? I'm not interested in coloring matching or unmatching parentheses/brackets.
I've tried ":hi cBracket/whatnot guifg=something" and ":hi Operator/cOperator guifg=something" but these don't seem to affect anything.
There are two parts to Vim syntax coloring: the syn
command and the hi
command.
As far as I understand, you use syn
to define syntax. For example:
syn match parens /[(){}]/
Then you use hi
to tell Vim how to highlight parens
:
hi parens ctermfg=red
See :h pi_paren.txt about highlighting matching parens:
To disable the plugin after it was loaded use this command: >
:NoMatchParen
And to enable it again: >
:DoMatchParen
The highlighting used is MatchParen. You can specify different colors with
the ":highlight" command. Example: >
:hi MatchParen ctermbg=blue guibg=lightblue
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With