Reputation: 501
I am working on a project that has a very large source tree. Since the source tree is large, the 'find in files' functionality of Sublime Text 3 takes quite some time to complete its search. I know that the symbols for which I am searching will only occur in certain (perhaps multiple) subdirectories of this source tree.
Is there a way to restrict the 'find in files' functionality of Sublime Text 3 to search multiple (but not all) subdirectories of a project source tree?
Upvotes: 4
Views: 4625
Reputation: 4412
Let's say you have a folder structure like this opened in Sublime Text:
root
other
bar
foo
target
bar
foo
We want to search in target.
In the Where field, add this filter:
target/
The filter means "Search in any files that have a folder named target in the path.
You can be more specific by including more of the path, e.g. target/foo/
. This will search in root/target/foo/
, but not root/other/foo/
.
Specify additional subdirectories by separating with commas, e.g. target/foo/,other/bar/
.
Official Search and Replace documentation
You'll probably eventually also want to filter by file type. See this SO question for how to do that.
Upvotes: 9