Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Usually, 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?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.