vim does very good job in highlighting, using the packaged syntax files. Unfortunately, it does bad job with
MySQL. At first, I looked everywhere for a better MySQL vim syntax file, with no luck. Later I started writing my own MySQL highlighter, based on the original one, and based on the updated MySQL manual. However, this task has turned out to be more complex that what I originally thought it would be.
Then I found out
pygments does nice job with
MySQL. Of course, this is not a fair contest, as
pygments may do more serious lexing than vim; however, a deeper look into the
MySqlLexer class of
pygments reveals this is a
RegexLexer, which probably have no further capabilities than the vim highlighter.
So my question is this: can you think of a simple way to convert a lexer from
pygments, or at least a
RegexLexer, into a vim syntax file?