How do I make all occurrences of a phrase (search term) in a file to be highlighted in the VS code editor?
views:
3174answers:
5When you run a "find" you can click "bookmark all" which will identify on the left which lines the search terms occur on, but you can't "highlight" the elements using visual studio, out of the box.
If you use the CTRL-i short cut, it'll do an inline incremental search. Keep pressing CTRL-i to jump to & highlight each subsequent occurence in the file.
I'm not sure that you can highlight all occurences at once. It may be possible with a plugin like ReSharper but not that I'm aware of.
Hi,
I noticed that a nice side effect of the Rock-Scroll plugin is that when you double-click a keyword it highlights all occurrences in the file (and in the rock scroll preview) as well.
http://microsoftdev.blogspot.com/2008/05/rock-scroll-visual-studio-plugin.html
Hope that helps, Alex
ReSharper can do this with the Highlight Usages feature: Highlight Usages In File
Course, you need ReSharper ;)
I have just done a quick google for this very feature.
Came up with these results
VS 2008 http://visualstudiogallery.msdn.microsoft.com/en-us/ad686131-47d4-4c13-ada2-5b1a9019fb6f
VS 2010 http://visualstudiogallery.msdn.microsoft.com/en-us/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb