How can I search in one subfolder folder of my workspace only?
CTRL+SHIFT+F searches in the whole workspace, and since this is large I get way too many hits in unrelated folders and files.
How can I search in one subfolder folder of my workspace only?
CTRL+SHIFT+F searches in the whole workspace, and since this is large I get way too many hits in unrelated folders and files.
Two options:
This will give you a slightly changed search bar:
Another twist on this is how to search in a collection of named subfolders. For example, consider a directory structure like this:
Project
├── Foo
│ ├── inc
│ │ ├── tom.h
│ │ └── dick.h
│ └── src
│ ├── tom.cpp
| └── dick.c
├── Bar
│ ├── inc
│ │ └── harry.h
│ └── src
│ └── harry.c
The "files to include" box will accept glob notation, so if the user wants to search only in "src" directories, not in "inc" directories, they can specify:
./**/src/*
This is interpreted (from right to left) as "any file, in a 'src' sub-directory, underneath any directory".
Obviously, this is a trivial example which could be handled by filtering on the file extension, but the principle applies to much more complex searches. For another example, see: https://stackoverflow.com/a/59083215/6419400