WebStorm: search does not work
SearchIntellij IdeaPhpstormWebstormSearch Problem Overview
I know that is used to search : Ctrl+Shift+F or Edit | Find | Find in Path and it worked before, but now always returns the empty set, although I know that what I'm looking for - there is in the project
Maybe someone had this problem?
Search Solutions
Solution 1 - Search
As lena said, the following should fix it for you:
- Click File -> Invalidate Caches / Restart..
- Click the button "Invalidate and Restart"
- After restart, try run the search again
Solution 2 - Search
For me nbaosullivan's proposed solution didn't work.
In my case Recursive(Alt+Y) options wasn't selected. I selected it and it worked and it will be set as default, you don't need to select it all the time.
Solution 3 - Search
Try this (it helped me in PhpStorm 2019.3.1 when "Invalidate Caches / Restart" did not):
-
Close WebStorm
-
Backup directory
<your project>/.idea/
to anywhere -
Delete file
<your project>/.idea/modules.xml
-
Open WebStorm
Solution 4 - Search
Newer version of Webstorm /PHPStorm automatically exclude some folders. For example vendor folder.
make sure that folders are not excluded
Solution 5 - Search
I thought I had this issue but I think actually WebStorm is only returning the first 100 or so results which all happen to be located in 2 files and thus the other occurrences in other files are not shown.
Solution 6 - Search
For me unchecking the "Words" option (which searches as a whole word) make it work.
Solution 7 - Search
As an alternative where I needed to refactor the word "holder" with "owner". Using Webstorm's find did not work very well for me. I decided to use instead the the command line with egrep:
egrep -Rli [^place]holder ./src
-R (recursive all files in directory including symbolic links)
-l (file name only)
-i (ignore case)
I found everything and excluded some instances as well via regex. It is way easier and most accurate.
Solution 8 - Search
This is how I fixed the issue:
- File
- Repair IDE...
- (Follow steps to repair indexes)
After doing this, I was able to search "everywhere" using Shift Shift