Hi, I was editing some .cfg files in Vim and noticed that it tries to highlight them according to a series of rules that don&#39;t at all apply to q3&#39;s config files, except for comments. Especially annoying was the tendency to mess up cvars whose value strings contained an equals sign, and the treating of ; as a comment in vstr strings. I could turn off syntax highlighting altogether, but that was less than satisfactory.<br>
Not content with any of these options, I decided to create an altogether new syntax highlighting file exclusively for quake3 config files.<br>It does the following:<br>1) Colours comments (// to end of line) according to your Comment rule (usually some shade of blue)<br>
2) Colours common cfg commands (set[asu], bind, exec, vstr, and map) according to your Statement rule (usually yellow)<br>3) Highlights TODO and FIXME in comments and strings according to your Todo rule (yellow background, black text)<br>
4) In strings, attempts to convert colour codes ^[0-8] until the next code or until a &quot; to their appropriate colour<br><br>It&#39;s the first such file I&#39;ve ever written, and as yet I&#39;ve found no way to have vim differentiate between the cfgs it expects and quake3 config files, so you pretty much have to choose one or the other (or, at the top of your config files place a line that reads &quot;// vim: set filetype=q3cfg :&quot; and configure for that filetype in your .vimrc). I also have no idea whether the colours that correlate on my screen also correlate on yours, so I apologise in advance if I cause you to claw out your own eyes in horror. The commands I chose to highlight are a bit arbitrary (mostly what I just stumbled upon in server.cfg and autoexec.cfg) and, as I comment in the file, might be generalisable. Another thing lacking is a nice highlighting of strings (I just don&#39;t know what to do with them) and non-quoted values (I don&#39;t even know how to match them).<br>
<br>I&#39;m sure this mailing list is composed almost entirely of people better than me at both vim and q3, so I welcome your comments and criticism.<br>