Udostępnij za pośrednictwem


Find Command

Searches files using a subset of the options available on the Quick Find tab of the Find and Replace window.

Edit.Find findwhat [/case] [/doc | /proc | /open | /sel] 
[/markall] [/options] [/reset] [/up] [/wild | /regex] [/word]

Arguments

  • findwhat
    Required. The text to match.

Switches

  • /case or /c
    Optional. Matches occur only if the uppercase and lowercase characters exactly match those specified in the findwhat argument.

  • /doc or /d
    Optional. Searches the current document only. Specify only one of the available search scopes, /doc, /proc, /open, or /sel.

  • /markall or /m
    Optional. Places a graphic on each line that contains a search match within the current document.

  • /open or /o
    Optional. Searches all open documents as if they were one document. Specify only one of the available search scopes, /doc, /proc, /open, or /sel.

  • /options or /t
    Optional. Displays a list of the current find option settings and does not perform a search.

  • /proc or /p
    Optional. Searches the current procedure only. Specify only one of the available search scopes, /doc, /proc, /open, or /sel.

  • /reset or /e
    Optional. Returns the find options to their default settings and does not perform a search.

  • /sel or /s
    Optional. Searches the current selection only. Specify only one of the available search scopes, /doc, /proc, /open, or /sel.

  • /up or /u
    Optional. Searches from the current location in the file toward the beginning of the file. By default, searches begin at the current location in the file and searches towards the end of the file.

  • /regex or /r
    Optional. Uses pre-defined special characters in the findwhat argument as notations that represent patterns of text rather than the literal characters. For a complete list of regular expression characters, see Regular Expressions.

  • /wild or /l
    Optional. Uses pre-defined special characters in the findwhat argument as notations to represent a character or sequence of characters. For a complete list of wildcard characters, see Wildcards.

  • /word or /w
    Optional. Searches only for whole words.

Example

This example performs a case-sensitive search for the word "somestring" in the currently selected section of code.

>Edit.Find somestring /sel /case

See Also

Tasks

How to: Search Using Results Lists

Reference

Quick Find, Find and Replace Window

Find Results Windows

Command Window

Find/Command Box

Visual Studio Commands with Arguments

Predefined Visual Studio Command Aliases