I finally bit the bullet and wrote some quick scripts to generate syntax files containing thousands of keywords from the codebase with which I am working, using ctags and awk. The resulting files are pretty big.
I have placed all the identifiers on a single line with "syn keyword (type)" at the beginning. There are two files of keywords (types and defines/enumerators), which are 250,000 characters and 650,000 characters respectively (we have a load of enumerators apparently!) The way that I am making use of these files is by sourcing them in after\syntax\c.vim, which means they are loaded every time I open a file. This becomes mildly annoying, because the load of the file now takes 2-3 seconds, thanks to the two massive "syn keyword" lines. Is there any way to say "for this instance of vim, make use of these keywords in all .c, .inl, .cpp and .h files", so that I don't need to resource the files every time I open a new source file? Or even just to make the sourcing go more quickly? Additionally, I have seen some standard keywords are being overridden (for example we have a #define const somewhere in a library, for some reason). Is there any way to say "only make these words keywords of this type if they haven't been keyworded already"? I'll just say: it is awesome to see all your keywords nicely highlighted across the codebase :) Thanks in advance! Max -- Max Dyckhoff AI Engineer Bungie Studios
