How does vscode search only in a directory? Setting method of vscode search criteria

Time:2021-10-13

Friends who use the vs code editor have used the search function, but they will find the files under all projects by default. If you want to set the search function, for example, to search only in a folder, how do you set it? Let’s take a look at the setting method of the search function.

Specify a directory lookup

In the editor, click the find Icon on the left.

After opening the search interface, enter the keyword to search here.

Press enter to find,All items will be found。 Contains too many matches.

To find only one directory, IFirst click to select the directory to find.

Right click and clickFind in Folder」。

In this way, the search interface is limited to this directory.

The search results are much less now than before.

Setting method of search function

 

We click the search button under the user menu, and then we find the search option.

Then we can be hereAdd widget

Click to successfully add, that is, this little tick is selected.

Then we can do it hereSetting of range during automatic search.

Well, we can still do it hereWhether to control the setting of the selected content.

Now we can go back to the code panel and start using these functions.

The above is how to set vscode search criteria. I hope you like it. Please continue to pay attention to developeppaer.

Relevant recommendations:

Vscode terminal error prompt how to find errors?

How to display vscode type parameters? Skills of vscode displaying type parameters

How does MAC vscode prohibit automatic completion of parentheses? Vscode forbids the technique of jumping out of the right parenthesis