Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable syntax highlighting for *.handlebars files within Visual Studio 2012?

The broader question might be "Can you associate existing syntax highlighting (e.g. *.html) with arbitrary file extensions (e.g. *.handlebars) within Visual Studio 2012?"

I know there is an extension which allows highlighting of handlebars templates within *.html files, however I require the naming convention of *.handlebars for precompilation.

like image 396
M. Herold Avatar asked Nov 22 '13 21:11

M. Herold


People also ask

How do you add syntax highlights?

To add a syntax highlighting language, simply check its checkbox in the main list of languages. It will appear with a checkmark in bold font to show that it has been selected but not yet installed.

Does Visual Studio have syntax highlighting?

Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.


1 Answers

Under Visual Studio -> Tools -> Options you can set the type of editor for each extension:

Set the extension editor

I have the following features installed, not sure which one acctually installs the Javascript Editor:

  • The Visual Studio Web Developer Tools (out of the box feature) Web Developer Tools
  • The ASP.NET and Web Tools 2013.1
  • Visual Studio 2012 Extensions for the Windows Library for Javascript
  • WebEssentials
  • And of course Visual Studio 2012 Update 4
like image 61
jessehouwing Avatar answered Oct 06 '22 23:10

jessehouwing