A couple of years back I wrote the Smarty 2 mode for CodeMirror – an in-browser syntax highlighter. Well, Smarty 3 had a few syntax changes, so I updated the mode to allow for optional Smarty 3 highlighting.

Demo: http://www.benjaminkeen.com/experiments/CodeMirror/mode/smarty/

It’s pending a pull request, but should be in CodeMirror pretty soon.