I'm using PyCharm Community Edition 4.0.4 and I'd like to set a default option for the scope of 'Find in Path'.
Currently, pressing Ctrl-Shift-F (the 'Find in Path' command) pops a window with 'All projects' selected, and I'd like to have 'Directory' with a custom directory set as the default instead. Here's a picture:
I searched the Settings for anything like this, but could not find it. Any help is appreciated.
Update: I've recently discovered that by right-clicking on my project folder and selecting "Find in Path ..." (I mean actually clicking the option), the scope is automatically set for the project directory! Strangely enough, the keyboard shortcut indicated in the drop-down menu from right-clicking the project folder is exactly the same as I use. Using the shortcut, however, yields the 'All projects' selection for Scope...
In any case, I still wish to set a default directory for the Find in Path dialog - preferably one that is consistently used regardless of how the dialog was invoked (shortcut, clicking drop-down option).
Invoke Find in Path ( Shift+Ctrl+F Win/Lin, Shift+Cmd+F on macOS) to bring up the Find in Path dialog.
Open the Project Structure settings. In the Projects pane of the Project Structure page, click the project you want to configure content roots for. In the dialog that opens, locate the desired directory and click OK.
A scope is a set of files to which various operations apply. Using this dialog, you can define scopes for the various PyCharm actions, for example, Find Usages or Code Inspections.
It seems this is the default behavior for the Intellij-like IDEs such as Pycharm.
As answered by the JetBrains support:
"We have related issue in YouTrack: https://youtrack.jetbrains.com/issue/IDEA-87037 Feel free to vote for it and leave comments."
I reproduce the text of the issue below, in case the link goes dead:
IDEA-87037 Usability: Find in Path -- NOT in Whole project
What steps will reproduce the problem? 1. Press Shift-Ctrl-F
What is the expected result? The dialog comes up with the previously selected Scope.
What happens instead? The dialog always comes up with "Whole project" selected.
After having selected "Directory" for the 257th time (and forgetting it one out of four times) I can't help thinking that this is really stupid and obnoxious software.
I want to search in the entire project maybe once out of 100 times. Why does PhpStorm keep insisting that I should search in the whole project?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With