5

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?

8
  1. Open any .cshtml file
  2. In the main-menu, choose View > Syntax > Open all with current extension as… and select HTML
  • 1
    Why couldn't I find any tutorial online that just said that?? They all wanted me to open my HTML.sublime-settings. Thanks! – toshiomagic Apr 11 '17 at 13:37
  • Well this is only applying HTML formatting - none of the Razor syntax is highlighted - so it's at best a 50% solution. – niico Sep 20 '18 at 11:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.