How to exclude hidden files on MacOS

Answered

IJ is indexing `.gradle` folder in my project. I know I can exclude it in Project Structure → Modules, but I can't seem to figure out how to do it for the hidden folder (starting with a dot). If I click “Add Content Root” then the system dialog won't show the hidden files. I wish I could just type the path in. How can I exclude a hidden directory from search?

0
3 comments

You can exclude hidden folders from indexing. The system file chooser hides dot-folders by default, but you don’t need to add them as content roots first. Instead, in Project tool window, right-click the .gradle folder, then select Mark Directory as | Excluded.

Here’s the our Help article with more details: https://www.jetbrains.com/help/idea/excluding-files-and-folders.html

0

For some reason, search includes `.gradle` directory in my home directory – so, outside of my project. Could you help me exclude it from search?

0

Grigory Temchenko, you can create a custom search scope that excludes the .gradle directory:

  1. Go to Edit | Find | Find in Files or press F
  2. In the search dialog, click on the Scope tab
  3. Click to configure scopes
  4. Click + and create a new scope or modify an existing one to exclude .gradle directory

Please let me know if that helps.

0

Please sign in to leave a comment.