How to search for text in all files in a directory?
Solution 1:
You can do Edit, Find in Files (or Ctrl+Shift+F - default key binding, Cmd+Shift+F on MacOS) to search the Currently open Folder.
There is an ellipsis on the dialog where you can include/exclude files, and options in the search box for matching case/word and using Regex.
Solution 2:
In VS Code...
- Go to Explorer (Ctrl + Shift + E)
- Right click on your favorite folder
- Select "Find in folder" (Alt + Shift + F)
The search query will be prefilled with the path under "files to include".
Solution 3:
-
Press Ctrl + Shift + F
-
Click on 3 dots under search box.
-
Type your query in search box
-
Type
./FOLDERNAME
infiles to include
box and click Enter
Alternative way to this is, Right click on folder and select Find in Folder