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:

 "folder_exclude_patterns":
 [
    ".svn",
    ".git",
    "build"
 ],

Thanks,
Rich

0

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

5

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

Best,
Rich

0

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.

0

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

0

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.

0

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

0

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?

0

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.

0

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:

0

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...

0

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

1

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)

2

请先登录再写评论。