Reputation: 4947
I'm new to PyCharm (and Python) but can't find a way to do a complete search for a word in all my files in my PyCharm project. Every time I do Edit-->Find it keeps searching either in the current file of searches for the word where my caret is located. How does one do a complete scan of all files for a word that I typed?
When I select Find Usages, it tells me to position my caret to a specific word.
Upvotes: 101
Views: 63059
Reputation: 3703
Make sure that you chose the actual working folder, and not it's parent.
Upvotes: 0
Reputation: 2018
On the main menu, choose Edit | Find | Find in Path, or press:
Windows or Linux: Ctrl + Shift + F
Mac: ⇧ + ⌘ + F
More info here
Upvotes: 158
Reputation: 69983
There are multiple ways to do this. I am using PyCharm 2019.1, but I bet that it will work in previous versions.
⇧ + ⌘ + F (mac) or
Ctrl + ⇧ + F (windows or linux)
This will open the following in which you can type the word you are looking for.
⇧ + ⌘ + A (mac) or
Ctrl + ⇧ + A (windows or linux)
The following will be opened in which you could type Find, and select the option Find in Path (notice that the command for this action is displayed next to it). After selecting this, you will be taken to the same menu that is opened when running the Find in path shortcut.
You can right-click on your project's name, and select the option Find in Path... which will also open the menu that is opened after running the Find in Path shortcut.
Upvotes: 3
Reputation: 2681
Ctrl + Shift + F
as others have stated. In addition, toggle those four buttons below the search bar to vary the scope of your search... In Project
Module
Directory
Scope
. You really have to watch out. Also, take note of the check boxes above. You want everything to be properly set. You don't want to be searching a Directory when your intention is to search the whole project.
Upvotes: 2
Reputation: 292
If you look at the "project files" tool window, you can right click a directory and choose "find in path".
Upvotes: 4