Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you turn off Razor highlighting in VS 2013?

I found a thread: Highlighting kills my Razor syntax in Visual Studio 2010 , asking and explaining how to turn off the highlighting for Razors code.

The problem is, I navigate to: Tools -> Options -> Environment -> Fonts and Colors but the razor option isn't there!

I'm sure I can get used to it, but its rather distracting because I'm still very new with MVC.

This are the options I have:
An example of what I'm seeing with the highlighting and the options

(the picture didn't come out as clear as I thought it would, but the Razor options aren't there!)

like image 965
Aidan Quinn Avatar asked Feb 09 '15 06:02

Aidan Quinn


3 Answers

Although the instructions on the accepted answer takes you to the correct settings that needs to be adjusted, it took a while for me to adjust the settings. So for those like me, the key is to change the Item Background property of the HTML Razor Code Background, but the background color you need to choose should be the same as that of Plain Text (the first item in Display Items list). Since I use dark theme, that default color of Plain Text wasn’t available for HTML Razor Code Background. So I had to go Custom… copy the color settings from Plain Text, and then got HTML Razor Code Background, Custom… and plugin those color setting number and now that highlight is gone!

like image 21
anish Avatar answered Nov 04 '22 07:11

anish


You have to find Tools -> Options ->Environment -> Fonts and Colors -> HTML Razor Code Background to change it in VS 2013.

like image 169
Mateusz Rogulski Avatar answered Nov 04 '22 08:11

Mateusz Rogulski


Please see option that starts with HTML (i know its not obvious but does the trick).

alt text

like image 4
SBirthare Avatar answered Nov 04 '22 07:11

SBirthare