Question

I am using Resharper 6.x with VS2010. One of the features is that if you double click on a variable, it is highlighted and then other usages of the variable are highlighted, like so:

enter image description here

The background and foreground colors of the highlighted variable are too close to each other and I am trying to change it in the Options/Fonts and Colors dialog. It has a small Sample window (below). I've gone through the entire list of display items and can't find the one matching what I see in the coding window.

enter image description here

So 2 questions:

  1. Which display item should I change to affect the back/fore colors of the highlighted variables?
  2. Is there some tool that that will point me to the display item in question for any piece of code?

P.S. I am using the Ragnarok as my base color theme.

P.P.S. This may have nothing to do with Resharper. I turned it off and the coloring was still there. I guess my original question still stands - how to affect the colors of the highlighted variables.

Was it helpful?

Solution

Visual Studio 2010 Reference Highlighting

As you already presumed: The reference highlighting of current selection is not a ReSharper feature but a VS 2010 feature. So you need to look at VS items in Fonts and Colors dialog.
The right display item is Highlighted Reference.

enter image description here

ReSharper Reference Highlighting

ReSharper's equivalent is Highlight usages in file by pressing Shift+Alt+F11.

  • Then all read references have light blue background color (related display item in Fonts and Colors dialog is ReSharper Read Usage).
  • And all write references have rose background color (related display item in Fonts and Colors dialog is ReSharper Write Usage).

But the disadvantage of ReSharper's reference highlighting is that you need to press a shortcut. VS does the highlighting automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top