Is there a way to search for text in all files in a directory using VS Code?
I.e., if I type find this
in my search, it will search through all the files in the current directory and return the files that matched.
Search All Files in Directory To search all files in the current directory, use an asterisk instead of a filename at the end of a grep command.
If you'd like to always search within file contents for a specific folder, navigate to that folder in File Explorer and open the “Folder and Search Options.” On the “Search” tab, select the “Always search file names and contents” option.
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.
In VS Code...
The search query will be prefilled with the path under "files to include".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With