I'm searching for a string and getting matches in a source folder, and a build folder (file in source gets copied to build during build).
I do not need the build folder result.
Vim has wildignore
which helps filter out results.
Is there something similar in intelij?
Mark your build folder as excluded:
File > Project Structure > Modules > Sources > Mark as Excluded (red icon)
You can also just right click on your folder and select Mark Directory As > Excluded
.
Excluded folders (shown as rootExcluded) are ones that IntelliJ IDEA "partially ignores". Very limited coding assistance is provided for files in excluded folders. Classes contained in excluded folders don't appear in code completion suggestion lists, references to such classes are shown in the editor as unresolved. When searching, IntelliJ IDEA doesn't look in excluded folders, etc.
Note: See the answer by Nader Hadji Ghanbari for another approach using Scopes.
I don't have File > Project Settings in intellij 14. I have excluded some folders and they are not included in search.
If you ignore a folder, if will not show up in your search results. You can also just right click on your folder and select
Mark Directory As > Excluded
.Including a folder from project is only acceptable if that folder should be really ignored. Sometimes you don't want to exclude the folder, but you want simply to exclude it from the search.
I just tried this in IntelliJ 15.0.6 and excluded folders still show up in search results.
Most likely if you're asking the question that OP is asking, this is actually the answer you're looking for.