Exclude node_modules from sublime search
Have you had a problem where you use
Find And Replace at the root of your project inside the
sublime text, and there are bunch of search results from
node_modules, bower, which you don't care?
Solution 1If you want to exclude a directory from your search results, add this the following filter in your query:
For example, when you type the following query as shown in the image
It will search for
/PWD/<pr_root>, -*/bower/*, -*/node_modules/*
helpersword inside the root of your project excluding the node_modules and bower directory. Note the second query uses a relative path.
Solution 2To globally exclude folders from search results, put these settings in
// Packages/User/Preferences.sublime-settings "folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules", "bower", "coverage", "test-results"]