Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code: Search multiple directories

When searching, VS Code has the ability to list files to include to scope the search. This is used by default when using the "find in folder" feature. For example, searching src results in ./src as the files to include.

Is there a syntax I can use to list multiple directories here? For example, I want to search ./src and ./lib in one search.

like image 667
BRass Avatar asked Nov 13 '17 17:11

BRass


People also ask

How do I search all folders in VS Code?

VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term. Search results are grouped into files containing the search term, with an indication of the hits in each file and its location.

What does Ctrl d do in VS Code?

If you want to Add Selection To Next Find Match then use Ctrl + D . If you want to Move Last Selection To Next Find Match then use Ctrl + K + Ctrl + D .

How do I open multiple folders in VS Code?

Drag and drop# You can even select and drag multiple folders. Note: Dropping a single folder into the editor region of VS Code will still open the folder in single folder mode. If you drag and drop multiple folders into the editor region, a new multi-root workspace will be created.

How exclude folder from search VS Code?

From the search function, click the ellipsis to show the files to include and files to exclude text boxes. Enter any files and folder to exclude (separated by commas). From menu choose File ➡️ Preferences ➡️ Settings ➡️ User/Workspace Settings and filter default settings to search .


1 Answers

Did you try a comma like ./dir1, ./dir2? For me it seems to work

Filter with comma

like image 117
DAXaholic Avatar answered Oct 06 '22 07:10

DAXaholic