For a very long time I was not quite happy with the syntax highlighting in vim for C code. That was until I met JC, a colleague who had developped a m

pulkomandy / c.vim

submited by
Style Pass
2021-08-16 19:30:07

For a very long time I was not quite happy with the syntax highlighting in vim for C code. That was until I met JC, a colleague who had developped a much better syntax file which I quickly adopted and installed on all my machines.

Unfortunately his work was based on an older vim version from 1998. Today with the latest vim update, syntax was not working anymore. So I finally took a deeper look about how this works, and extracted the needed bits to make this a separate file that can be added to the existing syntax, without having to redo everything.

Another change is colorizing the parentheses of if, while, and for in the same color as the keyword (but this overrides rainbow parentheses so I'm not sure if it should be kept this way).

This script uses the standard colors for highlighting (mainly cType) so you keep all your colorscheme and customizations when you install it.

Leave a Comment
Related Posts