Exclude directories from ‘Search Everywhere’ in PHPStorm

I love the ⌘ + ⇧ + N ( Command + Shift + N) ‘Search Everywhere’ feature in PHPStorm to quickly navigate to a desired file. However, if you have a build process where you publish your web assets from one folder to other (like a public/ folder), you will want to exclude the compiled directory from search results. Otherwise, every time you do a ‘Search Everywhere’ in PHPStorm, you would end up with duplicate files in search results.

The solution is to simply right click on the compiled directory in the ‘Context Menu’ inside PHPStorm & then Mark Directory As -> Excluded

This will ensure that PHPStorm does not index this folder for search results & you would not end up making your changes inside the compiled file!

Show your support

Clapping shows how much you appreciated Akshay Agarwal’s story.