I manage my style declarations in a .cshtml file so that I can dynamically encode values, such as color codes, which I need to repeat often. I use MVC routing capabilities to serve stylesheets with the .css extension, so all this is opaque to the end user.
The .cshtml file contains mainly CSS, of course, with only a few dozen values passed dynamically, and some calls to helpers that I wrote to make working with CSS easier, so I would like to be able to view this file with CSS highlighting code.
Question: Can I manually set the language for the hightlighting syntax for a given file using Visual Studio?
Note. I know this is easy with Notepad ++, but I would prefer to do everything with the same editor.
UPDATE . I realized that this problem can (I think) weld to "Where is the executable for the CSS source code editor (default)?". This is an option when choosing "Open With ..." in the CSS file, but not an option when choosing "Open With ..." in the .cshtml file, so if I could just navigate to its location using "Add" in this master, my problem is solved. But ... where is this editor ?!
UPDATE (2) : My hack works, but since it is ugly, I would still like to know how to open the default CSS editor.
UPDATE (3) . I could really use the solution here, and it seems like a general solution would be useful in many cases. Hence the generosity.
UPDATE (4) : Well, my hack really works - you just need to open the file using the HTML HTML editor instead of the Razor editor.
Faust source share