VS Code - Search for text in all files in a directory

user2465134 picture user2465134 · Jul 25, 2016 · Viewed 319.7k times · Source

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. Basically like if I did a grep. My coworker told me Sublime has something like this.

Answer

DaveShaw picture DaveShaw · Jul 25, 2016

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.