Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
 How to: Search a Document Increment...
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio
How to: Search a Document Incrementally

You can search an individual document or window incrementally by entering a search string character by character, then observing the matches found as the search string lengthens. To activate an incremental search, choose Advanced from the Edit menu and choose Incremental Search.

An incremental search automatically searches the entire document or all text within a window, with the exception of text that has been collapsed or concealed. The editor highlights the first set of characters found in the document or window that match the search string entered.

f27e8wzh.alert_note(en-us,VS.90).gifNote:

You cannot use wildcards or regular expressions in search strings for incremental searches.

Incremental searches are performed by default from the current location in the document downward, and from left to right. To move to the next match, press CTRL+I. To reverse the direction of the search, press CTRL+SHIFT+I.

The options set in the Find and Replace window are global. This means they persist from one search of any kind to the next. Incremental searches use the Match case option setting from your previous search. If, for example, you previously selected the Match case option for a search performed from the Find in Files, Find and Replace Window, and then you perform an incremental search, the incremental search will also be case sensitive.

f27e8wzh.alert_note(en-us,VS.90).gifNote:

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.

To search incrementally

  1. Place the cursor in a blank section of the file or window you want to search.

  2. From the Edit menu, choose Advanced, and then select Incremental Search.

    The cursor icon changes to binoculars with an arrow indicating the search direction, and the status bar displays the text Incremental Search.

  3. Begin typing the search string.

    The status bar displays the search string you are entering, and the editor highlights the first match found for what you have typed so far.

  4. Continue to add characters to the search string.

    The editor searches again for a match of the augmented search string, and again highlights the first match found.

    If no match is found, the status bar displays the following message:

    Incremental Search: <text> (not found)

You can use the following shortcut keys while performing an incremental search:

To

Use

Move to the next match in the file

CTRL+I

Reverse the direction of the search

CTRL+SHIFT+I

Remove a character from the search string

BACKSPACE

Stop the incremental search

ESC

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Keyboard shortcut for incremental search has changed in VS2008      jvklik   |   Edit   |   Show History
In Visual Studio 2008, the keyboard shortcut for Incremental Search has changed to Alt-I, rather than Ctrl-I used in previous versions. Additionally, Alt-Shift-I will perform the reverse incremental search, previously done with the Ctrl-Shift-I key combo.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker