我在我的搜索结果 ( ) 中遇到过CMD Shift f几次,我在我知道的字符串中搜索我的项目 - 然后 PhpStorm 没有显示给我。
就像这里的这个:
这感觉有点令人毛骨悚然,我不能“相信”我的搜索能找到这个。
解决方案尝试 1 - 缩小搜索范围
如果我只在screens
-directory 中搜索,那么它可以找到它:
...但超级奇怪的是,如果我通过简单地删除 来扩大搜索范围screens
,那么我就不会出现:
我彻底浏览了整个列表 - 但FinanceSingleTermScreen
不存在。
解决方案尝试 2 - 考虑范围
Maybe it's because there are simply so many files for it to search in. But it's quite annoying if I have to setup scopes for all projects, to start trusting my search again.
Solution attempt 3 - Reindex project
If I mark my app
-folder at click CMD Option y (File >> Reload all from disk), to make sure it's not some memory thing.
But it doesn't do a difference.
Solution attempt 4: Close project and open it again
Didn't do anything.
Solution attempt 5: Change search string
I tried searching for >Prev
instead of Prev
, and then it shows up!!
And here it is, if I remove the >
:
... and I have went thoroughly through the search results of that last image. It's not there.
Solution attempt 6: Fiddle with filters
Obviously there are many options there.
I tried a bunch, but it didn't lead to anything.
Untried attempts
- File >> Invalidate caches: It just seems extensive and shouldn't be necessary (I hope).
Accordingly to your screenshots it actually works correctly.
You see, this "Find in Files" popup... it is more like a preview (very advanced one where you can edit the text right there... but still). It searches as fast as possible in multiple threads/files at the same time so the order and files searched can be different each time you search if you have many files with matched text.
The key info is shown on this part of your screenshot:
This means that you see only TOP 100 results (in a random order, see the note above).
It is even possible (although it's very rare) to see that all 100+ results are from a single file (while you may have 100 more files with such a popular keyword). For example: try searching for
class
in a project where jQuery file is present (it has a lot of matches for that keyword).To see ALL matches just hit the button at the bottom right ("Open in Find Window") and the IDE will open a toolwindow with ALL search results (it will pause at around 1,000 results and ask if it should continue searching). The preview area / editing the file right there is also possible just like in the popup, just enable it.
要限制搜索的文件,您可以使用文件掩码字段(右上角)、范围或目录(例如仅打开的文件/某些文件夹等)或更精确的搜索词(就像您使用的那样)
>Prev
。