Possible to mark all directories named 'build' as excluded?

I've been using the new feature in CLion 1.5 EAP that allows you to exclude certain folders from the global search and it is great. However what I immediately did was go through and select every folder named 'build' and manually exclude them (there are many, as they appear wherever I build something with Xcode or from the command line).  Is it possible to add a project or IDE-wide setting that would automatically exclude these folders named 'build' (or possibly some other pattern, ex. regex)?

In Sublime Test, I add the following to my Preferences.sublime-settings, which works quite nicely:




You can go to settings Editor | File Types, there is Ignore files and folders list. Add you set there.


Awesome, that was exactly what I was looking for. Thanks for pointing me to it!



Is it doable per project?
Say, I have one project where I want to mark all specific folders as ignore and another one which I don't want to have this rule.


Yes, mark directory as saves info per project. It's stored in the <project>/.idea/misc.xml file.


Just to note that saving the settings, as described above, completely hides matching directories from the project view, even if you have enabled "Show Excluded Files"

This is different from what happens if you right-click on a folder and select 'Mark directory as | Excluded' - where the folder is then shown in Orange, and can be shown or hidden, by adjusting the "Show Excluded Files" setting.


Clare Macrae please also check whether the ide.hide.excluded.files registry option (`Help | Find Action`, type "Registry...") is disabled.


Anna Falevskaya Thanks - this is what is looks like (I have not changed it)

It looks to me like that hide option is off, so excluded files should be shown?


Clare Macrae yes, it's disabled, so excluded files should be shown.

As far as I understand, it works correctly for you in case of directories which are excluded in the proper way - via `Mark directory as | Excluded`. Changing the <project>/.idea/misc.xml file is not a correct way of excluding directories. Anastasia didn't suggest to change this file, she just mentioned it in order to illustrate the fact that `Mark directory as` saves info per project.


Anna Falevskaya I think there has been a misunderstanding... I didn't change any misc.xml file...

I used this bit of the CLion UI:


I see now that the message at the bottom of that dialog does very clearly say that files and folders ignored in that dialog are not visible in the IDE and not indexed - which explains why that registry setting didn't affect their behaviour...


Clare Macrae indeed I misunderstood you, sorry for that. Thanks for clarifying! 


I agree with Anna that an option to automatically tag a folder as "excluded", based on its name, would be very usefull ! (And as I understood the conversation, not possible now)


Please sign in to leave a comment.