Skip to content

Commit 14d0291

Browse files
Merge pull request #10566 from MicrosoftDocs/main638721290370286344sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents a8d1f88 + 5999860 commit 14d0291

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

docs/ide/reference/find-in-files-command.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ monikerRange: "<=vs-2019"
1919
Search files using a subset of the options available on the **Find in Files** tab of the **Find and Replace** window.
2020

2121
> [!IMPORTANT]
22-
> 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.*
22+
> 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.
2323
2424
## Syntax
2525

2626
```cmd
27-
Edit.FindinFiles findwhat [/case] [/ext:extensions]
28-
[/lookin:searchpath] [/names] [/options] [/reset] [/stop] [/sub]
29-
[/text2] [/wild|/regex] [/word]
27+
Edit.FindinFiles findwhat [/append] [/case] [/ext:extensions]
28+
[/lookin:searchpath] [/options] [/reset] [/stop] [/sub]
29+
[/regex] [/word]
3030
```
3131

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

3737
## Switches
38+
/append (new in Visual Studio 2022)\
39+
Optional. Directs the results from the current search to be appended to previous search results.
40+
3841
/case or /c\
3942
Optional. Matches occur only if the uppercase and lowercase characters exactly match those specified in the `findwhat` argument.
4043

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

47-
/names or /n\
50+
/names or /n\ (not supported in Visual Studio 2022)
4851
Optional. Displays a list of file names that contain matches.
4952

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

69-
/text2 or /2\
72+
/text2 or /2\ (not supported in Visual Studio 2022)
7073
Optional. Displays the results of the search in the Find Results 2 window.
7174

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

7578
/word or /w\

docs/ide/reference/replace-in-files-command.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Replaces text in files using a subset of the options available on the **Replace
2121
## Syntax
2222

2323
```
24-
Edit.ReplaceinFiles findwhat replacewith [/all] [/case]
25-
[/ext:extensions] [/keep] [/lookin:searchpath] [/options] [/regex]
26-
[/reset] [/stop] [/sub] [/text2] [/wild] [/word]
24+
Edit.ReplaceinFiles findwhat replacewith [/all] [/append] [/case]
25+
[/ext:extensions] [/lookin:searchpath] [/options] [/preserveCase]
26+
[/regex] [/reset] [/stop] [/sub] [/word]
2727
```
2828

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

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

43+
/append (new in Visual Studio 2022)
44+
45+
Optional. Directs the results from the current search to be appended to previous search results.
46+
4347
/case or /c
4448

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

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

51-
/keep or /k
55+
/keep or /k (not supported in Visual Studio 2022)
5256

5357
Optional. Specifies that all modified files are left open.
5458

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

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

67+
/preserveCase (new in Visual Studio 2022)
68+
69+
Optional. Preserves the original casing of each match in your code.
70+
6371
/regex or /r
6472

6573
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).
@@ -80,11 +88,11 @@ Optional. Halts the current search operation if one is in progress. Replace igno
8088

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

83-
/text2 or /2
91+
/text2 or /2 (not supported in Visual Studio 2022)
8492

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

87-
/wild or /l
95+
/wild or /l (not supported in Visual Studio 2022)
8896

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

0 commit comments

Comments
 (0)