-
Notifications
You must be signed in to change notification settings - Fork 0
Using File Filters
By default, Find in Files searches all files in your project - the whole tree beneath the root folder that's open in Brackets. You can exclude files, file types, whole folders, or other patterns:
- Click the "No filter" dropdown
- Choose "Edit filter..."
- Enter one or more patterns to exclude
The more files you exclude from your search, the faster Find in Files will run.
A simple string matches any item whose full path includes that substring:
-
READMEmatches/code/README.md,/code/modules/README/main.js,/code/myREADME.txt, etc. -
/node_modules/matches/code/node_modules/foo.js,/code/node_modules/sub/bar.js, etc.
but does not match/code/node_modules_two/foo.js, etc.
Note: Always use forward slashes in filter paths, even on Windows. Brackets standardizes paths on all platforms to use "/" separators.
You can also use wildcards:
-
node_*matches/code/node_modules/foo.js,/code/node_core/foo.js,/code/node_foo.txt, etc. -
*.txtmatches/code/readme.txt,/code/readme.js.txt, etc.
but does not match/code/module.txt/foo.jsor/code/notes.txt2(filter strings containing "." are treated as filenames, so they won't match folder names or anything else with chars trailing the string you've entered - see below) -
/jquery*.jsmatches/code/jquery-2.1.0.js,/code/foo/jquery-1.7.min.js, etc. -
jquery-1.?.jsmatches/code/jquery-1.6.jsbut not/code/jquery-1.6.1.js
A * matches within a path segment (that is, it doesn't match "/" characters). To match "/" as well, use **:
-
thirdparty/**/jquery*.jsmatches/code/thirdparty/jquery-1.7.js,/code/thirdparty/foo/jquery-2.1.0.min.js, etc.
but does not match/code/jquery-1.7.js
(note that the "/"s surrounding a "**" can collapse, as in the first example above)
To enable you to write simple filters that don't always include **s, Brackets automatically adds ** using the following rules:
- A
**prefix is always added - unless the filter string already starts with** - A
**suffix is added unless the filter string's last path segment contains a "." (suggesting it's a filename) - or unless the filter string already ends with**
After this conversion, the filter string must match the entire absolute path of a file for it to be filtered out.