A Smarty syntax highlighter for CodeMirror has long been needed for my Form Tools script, so this weekend I finally took a few hours to put one together. It’s not been reviewed by the CodeMirror developer yet (Marijn Haverbeke), but will hopefully find its way into the main script at some point. I also plan on developing a HTML-JS-CSS-Smarty mixed mode, which will be useful in many places.

Example: http://www.benjaminkeen.com/misc/CodeMirror2/mode/smarty/

[UPDATE: Marijn accepted my changes and it's now part of the CodeMirror repository].

[UPDATE 2: I added in Smarty 3 support in May, 2013].