I use Intellij IDEA 12 and I want to hide .iml
files in Project view. How I can achieve this?

- 19,843
- 53
- 170
- 286
9 Answers
Check “Ignored files and folders” in File Types settings:
File | Settings | Editor | File Types for Windows and Linux
IntelliJ IDEA | Preferences | Editor | File Types for OS X
Then add *.iml;*.idea;
in the text box in the bottom:

- 18,541
- 27
- 119
- 168

- 2,334
- 1
- 13
- 2
-
2That does not work as *iml is reserved for Idea Module – Bohdan Yurov Jan 21 '14 at 06:47
-
1@nick4fake just FYI - adding patterns there worked for me in 14.1.5 – zeratul021 Nov 06 '15 at 13:05
-
This does not seem to work for mac intelliJ 14, it does not hide files in the project view, I can still see them. I have some special .*.expl files that I would like to hide – tsar2512 Oct 05 '16 at 14:50
-
I tried to ignore .class file using this method. Bad idea, Intellij even ignores .class files from jar libs... – Charles Oct 11 '16 at 07:57
-
1Thanks, works on IntelliJ IDEA 2017.1.1 Mac OS X 10.11.1 – sbk Apr 20 '17 at 23:06
-
Seems not to be working on Intellij IDEA 2017.1.3 Trial version on Windows 10. – Advicer May 26 '17 at 08:05
-
3Make sure you use a Semicolon not a Comma or else it will not work. – EminezArtus Jan 17 '18 at 23:34
-
Is this setting will block to add into git? – Hariprasath Sep 12 '18 at 04:21
-
Works great when wanting to filter .bak files as well. And you can always add the file to git manually by using the command prompt (git add -f "filename"), or smartgit. – T.S Jan 22 '19 at 16:13
-
Make sure to add **;** as separator. – mallaudin Oct 05 '19 at 11:10
-
1This answer is copied across the internet, but no longer exists in IntelliJ 2021.1.3, and I have so far been unable to find an alternative. – Robert Christ Jul 07 '21 at 17:17
For Intellij IDEA 13 on OS X 10.9, do this:
- Go to
Intellij IDEA > Preferences
. - Scroll down to the
IDE Settings
section, go toFile Types
. - Add
*.iml
and.idea
to theIgnore files and folders
list box at the bottom of this window.
The project navigator will be much cleaner!
I hope it helps!

- 9,919
- 3
- 61
- 61
- Go to
File
->Settings
->File Types
- Append
*.iml
to the list below "Ignore files and folders" (located at the bottom of the dialog)

- 41,306
- 31
- 146
- 239
-
2For Mac OS X, one should go to `IntelliJ IDEA` -> `Preferences` -> `File Types`. The rest of the instructions are valid for Mac OS X as well. – Dennis Laumen Jul 24 '13 at 06:25
IntelliJ 14 and 15 on Mac OS X (they've changed the hierarchy again in 14):
- Go to
IntelliJ IDEA
->Preferences
->Editor
->File Types
- Append
*.iml
to the list below "Ignore files and folders" (located at the bottom of the dialog)

- 3,527
- 1
- 20
- 16
For IntelliJ 14 on Windows, go to File->Settings->Editor->File Types
. At the bottom, append ;.idea;*.iml
.

- 1,675
- 26
- 57
Instead of hiding the files excluding them like folders seemed to be the better way for me.
Go to File
> Project Structure...
> Settings
> Modules
At the bottom is a box where you can enter the file types:
Now you can use the projects "Show Options Menu" to hide and show them:

- 141
- 1
- 6
-
This is what I would have answered if the question was how to hide a build folder. For those who are looking for this option, you should [right click on the folder > Mark Directory as > Excluded](https://www.jetbrains.com/help/objc/controlling-source-library-and-exclude-directories.html) – Toufic Batache Jun 14 '23 at 17:21
The solution to:
Check “Ignored files and folders” in File Types settings:
as explained in accepted answer, is located in the new UI as shown below:

- 39
- 1
- 6
-
2I accept this as a separate contribution (i.e. an answer of its own), though others might disagree. However, please replace "accepted answer" by the link you get from the "Share" beneath it. And you might rephrase to make more obvious what you contribute, maybe something like "The solution to > Check “Ignored files and folders”, as in the existing answer ... link ... is done in the new UI this way: ... picture ...". – Yunnosch May 31 '23 at 10:28
-
Putting files here will also make them disappear from the git tool (even if they're not gitignored)... Is there a way around this where the files can be hidden in the project view but still work in other parts of the IDE (like in the git tool)? – Microbob Aug 20 '23 at 07:20

- 748
- 6
- 14
-
It looks like the accepted answer said the same 7 years ago. So what value does your answer add? – Werner Henze Mar 27 '20 at 19:05