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?
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.
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With