exclude directory from search Follow
I frequently do 'Find in Path' to find a string, for example, I wanted to see where my project was using the string 'supertest'. When I do find in path, however, it searches my node_modules folder, which I do not want it to search. I am using meanjs, which puts node_modules right at the root. Is there a way to find a string within a project but exclude one directory path from the search?
Please sign in to leave a comment.
Hi there,

Create a custom scope (Settings | Scopes) and exclude unwanted folders/files there.
Now when you do "Find in Path" -- just use that scope
awesome!
My issue is a little different, I'm doing a refactor, and there are some conf files that must be added as libraries, and when I refactor, intellij does not search on them.
This feels now like renting a Chinese ferrari :(
@lmdbluis
What exactly do you mean by "refactor"? Is it IDE's own refactoring tool .. or you just doing manual find & replace kind of thing?
The thing is: stuff marked as a Library code is considered to be 3rd party code which is not meant to be user edited / touched by IDE's refactoring and alike (but it's there so it can be used for code completion and stuff).
For find & replace -- just point to the project root folder and IDE will do that in all folders, even excluded.
P.S. Some tools though can have Scope selector if invoked via additional shortcut (i.e. Find Usages).