Adding a syntax group to all syntaxes

I want to add a syntax group to all syntaxes. Namely, I want to highlight characters like +,-,*,/ and other punctuation characters for each programming language. I know that I can add a <language>.vim for each language to the .vim/after/syntax folder, but I want to make this general. Currently, I have to create one such (exactly the same) syntax adding file for each programming language, and this is ... inelegant.

Basically, I would like to place the all.vim file in .vim/after/syntax and add the contents of this file to each syntax file. I'm pretty sure this option does not exist (I checked vim docs), so I was looking for a way to emulate this. Is there a programmatic way to add a new syntax group to each syntax?

+4
source share
1 answer

You can just put it in your vimrc.

+1
source

All Articles