Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm: How to show exactly number of matches in Find in Path?

Tags:

find

phpstorm

In PhpStorm I use Edit > Find > Find in Path to find a word. But it show the message "100+ matches in 50+ files".

I would like the message to show the exactly number of matches and files.

PhpStorm showing FIND IN PATH

like image 316
Roby Sottini Avatar asked Nov 16 '25 20:11

Roby Sottini


1 Answers

Please note that results in the "Find in Path" popup are just a preview (very multifunctional one, you can edit the text right there... but still just a preview) so it shows TOP 100 results only. For some popular words you may see only a single file found as it may have all 100+ hits there.

If you want to see all matches, please click on Open in Find Window button at the bottom right (Ctrl + Enter on most keymaps) and you will see ALL results (it will open standard Find Results tool window that was used before this preview was introduced).

enter image description here

From https://youtrack.jetbrains.com/issue/IDEA-187379#focus=streamItem-27-2382897.0-0

We limit the amount to avoid performance problem, as it searches immediately on every keystroke - imagine how slow it would be if we look through all sources.

Also note that the search here is done in multiple threads in order to show you any results as fast as possible (so you can check if it finds what you need or if you need to adjust your text (e.g. due to a typo etc.)) That's why the results will in a rather random order and will change the positions if another search for the same text is executed.

From https://youtrack.jetbrains.com/issue/IDEA-187379#focus=streamItem-27-2724126.0-0

Actually, we limit search results with the first 100 occurrences because it's designed to be a preview UI. When there are dozens of found occurrences you can easily overview all of them and navigate exactly to the place you're looking for, otherwise you switch to the full result set in Find Tool Window.


There is an open ticket about improvements in this regard: how to make it more obvious to notice that there are more matches available, as not everyone can even spot the "100+ matches in 50+ files" text (the way how it is displayed on your original screenshot -- the text on the right of the search field).

https://youtrack.jetbrains.com/issue/IDEA-196723 -- star/vote/comment to get notified on any progress.

UPDATE 2021-12-14: For a while the "100+ matches in 50+ files" text is much easier to spot -- it is shown at the top left corner now.


Please note that 100 is not hardcoded constant but a default value. You can adjust ide.usages.page.size IDE property (Help | Edit Custom Properties... action) and set it to a bigger value (may affect other search related stuff as well).

Since search happens after each key press (after a small delay AFAIK) and your project is large... it will affect performance if you set it to the large value. I think it's not that hard to press Ctrl + Enter to see all matches (even if it's over 1000 of them)...

UPDATE 2021-12-14:

As of 2021.3 version you can edit that value right in the IDE Settings:

enter image description here

like image 196
LazyOne Avatar answered Nov 18 '25 19:11

LazyOne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!