1. Home
  2. Windows Tips
  3. Highlight all occurrences of selected text in visual studio 2010

Highlight All Occurrences Of Selected Text In Visual Studio 2010

bookmark all find

What would be the most suitable way to highlight all method calls, objects, function arguments/parameters, or plain text string in a Visual Studio document? Sometimes using Visual Studio native Find & Replace utility doesn’t help, as one has to click Find Next multiple times to cycle through all the occurrences of selected text. The Bookmark All feature (present next to Find Next) lets you add bookmarks in left margin to quickly find all the specified search keywords, but it requires you to manually find the entered text string from bookmarked line of code. Highlight All Occurrences provides a solution for this problem. You don’t have to enter the keywords to select all the occurrences in the document; just select the word you want to find in the document and it will not only add glyphs in left margin but highlights all the occurrences of selected text string as well. This saves you the trouble of finding all the existences of the text from the document manually.

Before installing the extension, close all the instances of Visual Studio running in the background. Now simply run the VSIX file to automatically install the extension. Once installed, launch Visual Studio and verify installation from Tools –> Extension Manager window.

When you select the text string in the document, it will highlight all the occurrences of selected text in the document and add glyphs in left margin to quickly find the selected text from your code.

select highlight 3

The text search is limited to only current document and it doesn’t support finding text occurrences from all documents of your project. Highlight All Occurrences also works on Visual Studio 2010.

Download Highlight All Occurrences

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.