Exclude directories in IntelliJ’s Find in Files

So, I’m working on a small project. Once in a while I open Find in Files to look something up, but I notice that the search is a bit slow even though I only have a few files. I’m aware of a directory called build/ in my project which contains generated code, but it is excluded, the search tool won’t look into it, or so I think. Long story short, the search tool does look into excluded folder when looking for text. Here’s how you can fix it:

  1. Open File in Files [1]
  2. Click on the Scope tab
  3. Click on the button with three dots (…) [1]
  4. Add a new Scope [2]
    1. Enter a name
    2. Include or exclude directories
1. Find in Files
2. Create custom scope

That’s it. Use your new scope to look for things only in the places you want.


Posted

in

,

by

Tags: