Exclude project dir from index/search, but keep in VC

I've been searching for a way to exclude a project directory from appearing in search results, but still have it tracked in version control update/commit. Is that possible to configure?

Comment actions Permalink

Hi there,

For indexing -- not sure (not using any VCS myself), but I think excluded folder still can be under VCS

For searching -- just define custom scope (Settings | Scopes) and use it when searching (I mean: "Find/Replace in Path" functionality, not "Navigate | File/Class/etc" which works with all indexed files)

Comment actions Permalink


if searching (Find/replace in path) is concerned, I can suggest using scope: you can configure a custom scope in Settings/Scopes, excluding some folders, and then specify this scope in 'Find in Path' dialog). There is however no way to exclude a folder from indexing. Please vote for http://youtrack.jetbrains.com/issue/IDEA-23537

Comment actions Permalink

Thank you both for the quick responses. I didn't know about Scopes, and although it won't solve my usage case (I really need to block the indexing), it may come in handy in other future cases.

Thanks also for the YouTrack link, which definitely covers what I wanted to do. The related issues therein are all similar as well. Obviously, I did a poor job on my initial search for this issue.

Another feature I wasn't aware of, is "Mark as plain text". But this would be a hassle to use in my case due to only working on individual files. This issue would extend that feature to directories, which would be nice as well.

I voted for both of those issues.

Note also that I tried adding the directory I had excluded as a separate directory via the Version Control settings, but modifications still don't show up in the Changes window or Commit dialog.

I'm not sure whether this question should be marked as 'answered' (since there are already YouTrack issues that cover it), or left as-is (since there isn't yet a way to accomplish the task). Please advise on that.

And thanks again for taking the time to help.


Please sign in to leave a comment.