About “Find in Path” functionality
Hello,
Using PhpStorm 2016.3.2 I found that “Find in Path” functionality works a bit different from prior versions :
If check “Directory” option then not dirrectory of current file is selected, but seems directory of last search...
If there is a way tio have dirrectory of current file entered here ?
Thanks!
Please sign in to leave a comment.
Hi there,
Well .. current behaviour is what a LOT of people have asked for a long time (to remember last searched directory: https://youtrack.jetbrains.com/issue/IDEA-87037)
What you can do here is to focus that folder in Project View panel first and only then invoke Find in Path -- it will set Scope to be that folder.
I don't know any better approach to this unfortunately.
Thank you so much Andriy! To be honest I was very confused and annoyed by that change and thought it's PHPStorm cache issue and was about to reset my entire project. The function name is "Find in Path" and I always... I mean ALWAYS expect it to show my current active file path! If those LOT of people need to search in particular directory then use Custom scope, it's there for a reason. Simple!
@Den Gordo
Well ... for me current behaviour makes sense if you wish to re-do search in the same files but for different text.
Some other tools that I'm using also use the same approach for the same functionality -- they remember last folder/file patterns (e.g. Notepad++, Delphi). Obviously, those are different tools that function a bit differently (not so context aware as IDEA-based IDEs are) ... but still.
I cannot say how often I'm using such functionality myself in PhpStorm (I mean -- repetitive search in specific folder -- I'm using "replace in whole project" from time to time) but in ordinary text editor I'm using it rather regularly (well .. few searches once per week or two -- when I need to go through the logs or stuff like that; logs are usually big so they are much better handled by text editor than IDE).
Creating a custom scope for used-today-only search (even few searches) is a bit overkill IMO as you need to remember to get rid of it otherwise that list may become quite long (it would be much better if IDE would provide sort of TEMP scopes that would be gone after project is closed...).
At the same time I agree that the lack of ability to quickly select current file folder is pretty inconvenient.