130

After updating to IntellijIdea 14 I have discovered that an excluded folder in my project is now visible.

Image of intelliJ folder structure with hidden folder visable

How do I hide it?

SeniorJD
  • 6,946
  • 4
  • 36
  • 53

5 Answers5

260

The answer is close, in the Project gear menu: enter image description here

PS: Yes, it's a self-learning post

Also, you may have switched on the Show Excluded Files option. If so, use Shift + Shift and type excluded and do the obvious thing. show excluded files toggle

OldCurmudgeon
  • 64,482
  • 16
  • 119
  • 213
SeniorJD
  • 6,946
  • 4
  • 36
  • 53
  • Does that actually work for you though? In my version of IntelliJ 14, this setting seems to be reset whenever I re-open a project, I've not yet worked out how to make it persistent. – Nicolas Rinaudo Jan 20 '15 at 18:39
  • @NicolasRinaudo yes, you're right, in case of `Reopen` this setting seems to be reset, But if you would open your project by `Open` option, it would work correctly. You should write to IntelliJ support, I think. – SeniorJD Jan 21 '15 at 08:26
  • 1
    Argh! Why do I have to do this for every project? Any way to set this up globally? – fmpdmb Jun 15 '15 at 16:12
  • Please indicate in the answer where that menu is. Still pretty frustrating if I can't find the option you're telling me to click. – Zook Feb 03 '16 at 18:10
  • 1
    No it's really not. A corner of the menu happens to be on the gear button, but there's no indication. I asked my coworker to look at this answer and try to find the menu, and it took him a good 10 minutes. Anyway, I fixed it. – Zook Feb 05 '16 at 17:28
  • 1
    Note from 2019: the option is not under the `Project` view anymore, it's now under the `Project Files` view; i.e. to hide the files you have to use the drop-down at the top to switch to `Project Files`. – ken May 31 '19 at 20:05
  • 1
    7 years later and you are still helping people thanks to this answer! Much appreciated. – sparc_spread Feb 25 '21 at 03:28
22

Right click at the directory you want to exclude to mark it as excluded, enter image description here, and then uncheck the Show Excluded Files option. enter image description here

Hunter Zhao
  • 4,589
  • 2
  • 25
  • 39
  • 3
    Checking and unchecking the "Show excluded files" does nothing for me even though I marked folders as excluded. – Stacksatty Dec 10 '20 at 14:25
11

1: Intellij IDEA > Preferences.

2: Go to File Types.

3: Add *.iml and *.idea to the Ignore files and folders list box at the bottom of this window.

Pang
  • 9,564
  • 146
  • 81
  • 122
Aaron
  • 387
  • 3
  • 3
2

In Idea 2022.2.2: project view -> gear icon -> Tree Appearance -> Show Excluded Files enter image description here

Line
  • 1,529
  • 3
  • 18
  • 42
0

In case you want to show excluded files instead of hiding them, you can invoke the Find action Window (e.g. Shift+Shift), search for Show Excluded Files and then turn it on or off. Sometimes there may not be this option in the Find action window somehow (such as me using the version 2019.3.3), but you can still toggle it by adding <option name="showExcludedFiles" value="true" /> to the node in .idea/workspace.xml:

<component name="ProjectViewState">
  ...
  <option name="showExcludedFiles" value="true" />
</component>

Then restart the project window.

Joseph Tesfaye
  • 814
  • 14
  • 26