Share via


Find Results Windows

The two Find Results windows display matches found when using the Find in Files, Find and Replace Window or Replace in Files, Find and Replace Window. The Result options for Find in Files and Replace in Files allow you to choose the Find Results window where any matches found will be listed. For further information, see Find in Files, Find and Replace Window, and Replace in Files, Find and Replace Window.

The selected Find Results window opens automatically whenever matches are found. To display a Find Results window manually, select Other Windows from the View menu and choose Find Results 1 or Find Results 2.

To jump to a match, double-click any line in the results list. The source file is displayed in the Code Editor with the insertion point placed where the matched text begins. A symbol appears in the indicator margin of the Editor to mark the line that includes the match, and the status bar displays its full text.

The buttons available on the toolbar in the Find Results windows allow you to navigate the list of matches. You can:

  • Go to the line of code containing the selected match

  • Go to the previous match in the list

  • Go to the next match in the list

  • Remove all matches from the Results list

  • Stop a background Find

Shortcut Keys

Use the following shortcut keys to navigate through matches:

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

CTRL+HOME

Scroll to the top of the Find Results window.

CTRL+END

Scroll to the bottom of the Find Results window.

Page Up

Scroll up to the next group of matches.

Page Down

Scroll down to the next group of matches.

UP ARROW

Select the previous match.

DOWN ARROW

Select the next match.

Search Result Entries

Each entry in the results list provides the following information:

  • Full path

  • File name

  • Line number

  • The full text of the line containing the match

For example, two entries in the results list from a Find in Files search for any strings matched by the regular expression "var[1-3]:Sm+par" might read:

c:\Projects\MyPrj1\MyClass.cpp(38):if var3=par then
c:\Projects\MyPrj2\MyClass2.cpp(12):while var1<>par 

Two entries in the results list from a Replace in Files search that replaced any strings matched by the regular expression "var[1-3]:Sm+par" with the string "sample" might read:

c:\Projects\MyPrj1\MyClass.cpp(38):if sample then
c:\Projects\MyPrj2\MyClass2.cpp(12):while sample 

Tip

You can use Quick Find to scan through a lengthy results list. For more information, see How to: Search Using Results Lists.

Summary Lines

Search results begin with a line that states the search parameters, and ends with a line of statistics. For example, the results list from a Find in Files search in all open documents for any strings matched by the regular expression "var[1-3]&par" might begin with this line of search parameters:

Find all "var[1-3]&par" Regular expression, Subfolders, Find Results 1, "All Open Documents"

and might conclude with this line of statistics:

Matching lines: 57  Matching files: 23  Total files searched: 59

The results list from a Replace in Files search in all open documents that replaced any strings matched by the regular expression "var[1-3]&par" with the string "sample" might contain this line of search parameters:

Replace "var[1-3]&par", "sample", Regular expression, Subfolders, Find Results 1, "All Open Documents"

See Also

Tasks

How to: Search Interactively

How to: Search Using Results Lists

Reference

Quick Find, Find and Replace Window

Find Symbol, Find and Replace Window

Find Symbol Results Window

Other Resources

Finding and Replacing