I want to exclude a file from the PhpStorm global search (Ctrl+Shift+F) but not exclude the file from the project itself. A good use case would be to avoid searching inside files like jQuery.js, but in my particular case, I have a plugin that generates code and it clutters my search results.
Being specific, this is the example search result:
The first result is uselss and will always be for me. So I would like to exclude it from the results. However, if I exclude it from the project then it will not be included in the auto-complete features of PhpStorm, which is the sole purpose of that file in the first place.
Or are there any alternatives to this? I could select a folder and search only there, but it is not as convenient as just pressing Ctrl+Shift+F directly from the editor
You can do that defining a scope
First of all you have to define a scope containing all the directories of your project that you want to be "searchable".
Go to Appereance & Behaviour -> Scopes
and create the scope
Then, in the "Find in Path" window you can select the Custom scope you want to use for the search
Right-click on the folder > Mark directory as > Excluded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With