1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #207 wontfix

vim lexer translation script

Anonymous created an issue

It seems that vim uses a similar regex-based lexer to Pygments. It should be possible to write a lexer-generator that reads vim syntax files and spits out Pygments lexers.

Reported by guest

Comments (8)

  1. Anonymous

    I admit that it sounds interesting and we also thought about that some time ago, but the task is not that easy. You have to write a mimimal vim script interpreter because vim supports some kind of context sensitive rule definitions. For example different rules can be applied if the filetype of the current document is HTML although you are in the XML syntax file. If you want to write such a script we are willed to include it into the pygments distribution but i don't think one of us will write such a script in the next time. :-(

  2. Log in to comment