Wednesday, November 11, 2009

Reader Question: MMM Mode?

Chris Keating writes:

"Could you ask your readership if there's a vim equivalent for emacs MMM mode:

mmm mode basically allows you to have different syntax highlighting for different parts of your document. This is really handy when you have SQL embedded in strings, etc."

Anybody have any ideas?


graywh said...

Take a look at syntaxes that do this already like PHP, Erb, rnoweb, etc. The key is using :syn-include. Just don't follow the help's example of using <sfile>:p:h/included.vim and instead use syntax/included.vim

Alex said...

Didn't do it myself, not enough advanced user