Sublime Text 2 recognize underscore templates as HTML

  1. Go to "Browse Packages" in the menu (where the menu item is depends on your platform).
  2. Open up HTML/HTML.tmLanguage
  3. Change this line (line 286 in my HTML.tmLanguage):

    <string>(?:^\s+)?(&lt;)((?i:script))\b(?![^&gt;]*/&gt;)</string>

    to this:

    <string>(?:^\s+)?(&lt;)((?i:script))\b(?![^&gt;]*/&gt;)(?!.*type=["']text/template['"])</string>

Now any script tags with type="text/template" or type="text/template" will render as html and not javascript.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)