How to get Sublime Text 3 to automatically highlight CSHTML as HTML

htmlsublime-text-3syntax highlighting

I have a bunch of .CSHTML files that I want to be highlighted. Every time I open a .CSHTML file I have to go to the bottom right of the sublime text window and manually tell it to treat the CSHTML as HTML. How do I force SB3 to automatically do this?

Best Answer

  1. Open any .cshtml file
  2. In the main-menu, choose View > Syntax > Open all with current extension as… and select HTML
Related Question