Make any text file that contains html treated as an html file

I am developing with MVC and I am not looking for code completion for .net syntax, or anything .net related. I am simply looking for a way for WebStorm to treat my cshtml file as html.  I am newer to WebStorm, and see that I can inject languages, but can't find this option for entire files.  I can just change the extension back and forth from cshtml to html when in WebStorm, but I am hoping for an easier method.


Hi Ben,

please, try adding '*.cshtml' pattern to Settings/File Types/HTML files

Best regards,


Wonderful.  Such a versatile program.  Thank you very much!


Please sign in to leave a comment.