How to get JavaScript intellisense and syntax highlighting in HTML display templates
It is very easy to create your own HTML display templates in SharePoint 2013, but one thing you probably miss the most, is intellisense and syntax highlighting for your JavaScript code. All the JavaScript code needs to be written in a HTML comment, which will eventually be normal JavaScript code when the HTML gets converted.
Read more