Skip to content

Repo sync for protected branch #10566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions docs/ide/reference/find-in-files-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ monikerRange: "<=vs-2019"
Search files using a subset of the options available on the **Find in Files** tab of the **Find and Replace** window.

> [!IMPORTANT]
> Support for this command was removed in version 16.5 of Visual Studio 2019, and restored in version 17.12 of Visual Studio 2022. If you use this command with versions 16.5-17.11, you might see an error message that says, *Command "Edit.FindinFiles" does not accept arguments or switches.*
> Support for this command was removed in version 16.5 of Visual Studio 2019, and restored in version 17.12 of Visual Studio 2022. If you use this command with versions 16.5-17.11, you might see an error message that says, *Command "Edit.FindinFiles" does not accept arguments or switches.* Some options have been changed in Visual Studio 2022.

## Syntax

```cmd
Edit.FindinFiles findwhat [/case] [/ext:extensions]
[/lookin:searchpath] [/names] [/options] [/reset] [/stop] [/sub]
[/text2] [/wild|/regex] [/word]
Edit.FindinFiles findwhat [/append] [/case] [/ext:extensions]
[/lookin:searchpath] [/options] [/reset] [/stop] [/sub]
[/regex] [/word]
```

## Arguments
Expand All @@ -35,6 +35,9 @@ Edit.FindinFiles findwhat [/case] [/ext:extensions]
Required. The text to match.

## Switches
/append (new in Visual Studio 2022)\
Optional. Directs the results from the current search to be appended to previous search results.

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

Expand All @@ -44,7 +47,7 @@ Optional. Specifies the file extensions for the files to be searched. If not spe
/lookin: `searchpath`\
Optional. Directory to search. If the path contains spaces, enclose the entire path in quotation marks.

/names or /n\
/names or /n\ (not supported in Visual Studio 2022)
Optional. Displays a list of file names that contain matches.

/options or /t\
Expand All @@ -66,10 +69,10 @@ Optional. Halts the current search operation if one is in progress. Search ignor
/sub or /s\
Optional. Searches the subfolders within the directory specified in the /lookin:`searchpath` argument.

/text2 or /2\
/text2 or /2\ (not supported in Visual Studio 2022)
Optional. Displays the results of the search in the Find Results 2 window.

/wild or /l\
/wild or /l\ (not supported in Visual Studio 2022)
Optional. Uses pre-defined special characters in the `findwhat` argument as notations to represent a character or sequence of characters.

/word or /w\
Expand Down
20 changes: 14 additions & 6 deletions docs/ide/reference/replace-in-files-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Replaces text in files using a subset of the options available on the **Replace
## Syntax

```
Edit.ReplaceinFiles findwhat replacewith [/all] [/case]
[/ext:extensions] [/keep] [/lookin:searchpath] [/options] [/regex]
[/reset] [/stop] [/sub] [/text2] [/wild] [/word]
Edit.ReplaceinFiles findwhat replacewith [/all] [/append] [/case]
[/ext:extensions] [/lookin:searchpath] [/options] [/preserveCase]
[/regex] [/reset] [/stop] [/sub] [/word]
```

## Arguments
Expand All @@ -40,6 +40,10 @@ Required. The text to substitute for the matched text.

Optional. Replaces all occurrences of the search text with the replacement text.

/append (new in Visual Studio 2022)

Optional. Directs the results from the current search to be appended to previous search results.

/case or /c

Optional. Matches occur only if when the uppercase and lowercase characters exactly match those specified in the `findwhat` argument.
Expand All @@ -48,7 +52,7 @@ Optional. Matches occur only if when the uppercase and lowercase characters exac

Optional. Specifies the file extensions for the files to be searched.

/keep or /k
/keep or /k (not supported in Visual Studio 2022)

Optional. Specifies that all modified files are left open.

Expand All @@ -60,6 +64,10 @@ Optional. Directory to search. If the path contains spaces, enclose the entire p

Optional. Displays a list of the current find option settings and does not perform a search.

/preserveCase (new in Visual Studio 2022)

Optional. Preserves the original casing of each match in your code.

/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](../../ide/using-regular-expressions-in-visual-studio.md).
Expand All @@ -80,11 +88,11 @@ Optional. Halts the current search operation if one is in progress. Replace igno

Optional. Searches the subfolders within the directory specified in the /lookin:`searchpath` argument.

/text2 or /2
/text2 or /2 (not supported in Visual Studio 2022)

Optional. Displays the results of the replacement in the **Find Results 2** window.

/wild or /l
/wild or /l (not supported in Visual Studio 2022)

Optional. Uses pre-defined special characters in the `findwhat` argument as notations to represent a character or sequence of characters.

Expand Down