To enable HTML syntax validation within Handlebars templates in Sublime Text 2, follow similar instructions to

	<script type="text/x-handlebars" data-template-name="todos">
		<section id="todoapp">
		<!-- ... -->

Even with ST2 plugins such as sublime-text-handlebars, the HTML code still would not be presented as HTML (and you had to change the syntax of the file to Handlebars, removing ALL HTML syntax validation). Ideally we would keep the HTML file syntax as HTML.

Edit %APPDATA%/Sublime Text 2/Packages/HTML/HTML.tmLanguage and change:




The change will be instant; to see if it works, try commenting out a block (Ctrl-/) within a script tag. If Sublime Text thinks it is currently in HTML mode, they will be wrapped with HTML comments; otherwise Javascript comments.

(I don’t know if there is a better place to put this that won’t be overridden by updates yet.)