How to exclude a file from the global PhpStorm search (Ctrl + Shift + F)

I want to exclude the file from the global PhpStorm 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.

Specifically, this is an example of a search result: searching results

The first result is practical jokes and will always be for me. Therefore, I would like to exclude it from the results. However, if I exclude it from the project, it will not be included in the PhpStorm autocomplete functions, which is primarily the purpose of this file.

Or are there alternatives to this? I could select a folder and search only there, but it's not as convenient as just pressing Ctrl + Shift + F directly from the editor

+4
source share
3 answers

You can do this by specifying scope

First of all, you need to define an area containing all the directories of your project that you want to “search”.

Go to Appereance & Behaviour -> Scopesand create an area

Then, in the Find Path window, you can select the user area that you want to use for search

+7
source

Right-click the folder> Mark Directory As> Excluded

enter image description here

+4
source

Ctrl + Shift + F, , , .

Phpstorm

+3

Source: https://habr.com/ru/post/1624157/


All Articles