There is a nice feature in Visual Studio 2010. It’s called Highlighting Reference.
How this feature works is when you are working on your code in the editor and click on a symbol (class, object, methods, properties, variables), then all instances of the symbol are automatically highlighted. This makes it very easy to locate where a symbol has been used in that document.
You can use CTRL+SHIFT+DOWN ARROW (move down) or CTRL+SHIFT+UP ARROW (move up), to navigate through the highlighted instances of that symbol.
Here’s an example that highlights all instances of View() on the page when i click on any one of the references.
If for some reason, you do not see the highlighting, make sure that the feature is turned on by going to Tools > Options > Text Editor > C# > Advanced
Change Highlighting Reference Color
If you are not happy with the color used for highlighting, then you have an option to change it. To do so, go to Tools > Options > Environment > Font and Colors > Make sure ‘Text Editor’ is the chosen option in the ‘Show settings for’ section > Choose ‘Highlighted Reference’ in the Display Items List Box and use the Custom button to change the foreground and background color.
Tweet
2 comments:
Nice, but how do I disable the annoying 2 seconds delay between a click on a symbol and the appearance of the highlighting?
That delay is driving me nuts...
Post a Comment