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.
The solution above breaks code folding that's syntax based (because of the rules with {} overriding something previous). I haven't been able to figure out how to get around this...
Put the following in your .vimrc for red colored (), {}
You can do the same for squared brackets, but you need to escape the bracket characters, put the following in your .vimrc for colored []
There are two parts to Vim syntax coloring: the
syn
command and thehi
command.As far as I understand, you use
syn
to define syntax. For example:Then you use
hi
to tell Vim how to highlightparens
:See :h pi_paren.txt about highlighting matching parens: