Environment Setting for Highlighted Variable in Visual Studio
Asked Answered
F

3

38

Environment Fonts and Colors (Where's the one I'm looking for?)

I noticed that VS has a feature that if you click on a variable, it highlights all instances of that variable in your current file.

With my color scheme (a dark background with light text) it makes the highlighted variable very unreadable. I've gone through and tried to figure out which setting under "Environment Fonts and Colors" controls the background color of the highlighting, but I'm not having any luck. Can someone point me in the right direction?

So, in one sentence:

What in the list of "Environment Fonts and Colors" controls the highlighting that happens when you click on a variable?

Ferryboat answered 14/4, 2010 at 19:58 Comment(0)
O
50

It's called Highlighted Reference

Tools > Options > Env > Fonts and Colors > Text Editor > Highlighted Reference

And the result is: enter image description here

Orobanchaceous answered 14/4, 2010 at 21:26 Comment(4)
Thanks! I have been hunting for this for quite some time too... This same feature exists for braces to help you identify open/closing braces and it is called Brace Matching, you can change the Highlight and Rectangle settings for it to get the same visual as your variable highlighting.Stanfill
This applies to VS 2012 as well.Vegetal
But why this settings is not applied after VS restart? I have to set it every time again (although new color is OK in settings).Crim
Note that newer Visual Studios define this setting at a more granular level.Deliquescence
F
2

In my case, I had to change Fonts and Colors > Text Editor > Match Color:

enter image description here

Ferromanganese answered 16/2, 2016 at 16:8 Comment(0)
C
0

Highlighted Variable color change in Visual Studio

Tools > 
Options > 
Environment> 
Fonts and Colors -> 
Text Editor -> Highlighted Reference

Setting Page

Variable highlight

Then check it you will get color change.
Congruency answered 24/8, 2015 at 6:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.