Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight all references to X?

The Eclipse IDE has a neat little feature that I really miss in Visual Studio.

If I place the cursor on a variable or method name, the IDE will automatically highlight all references to it in the current document within the relevant scope.

I can't seem to find an option to turn on similar behaviour in VS2008 or Resharper 4. I know VS has a Find Usages function, but I'd like to do it automatically on the fly.

Does anyone know of a free addin which will add this functionality?

like image 819
Winston Smith Avatar asked Dec 09 '08 14:12

Winston Smith


People also ask

How do I highlight all cross references in word?

Replies (6)  Cross References are Fields and there are 3 settings in File > Options > Advanced > Show document content > Field shading. You can set that control to Always and all Fields in the document will automatically be shaded.

How do you show cross references in word 2010?

On the References tab, in the Captions group, click Cross-reference. In the Cross-reference dialog box, select the reference type. In the Insert reference to list, select which option you want to use as the reference (page number, caption, section heading, for example).


1 Answers

If you're using ReSharper, you can highlight the usages in the file with Shift-Alt-F11. Place your cursor on the variable you want to find usages of, and press the Shift-Alt-F11 combination.

like image 70
Bernhard Hofmann Avatar answered Sep 22 '22 13:09

Bernhard Hofmann