How do I find a word in all my files in Pycharm

44,955

Solution 1

On the main menu, choose Edit | Find | Find in Path, or press:

Windows or Linux: Ctrl + Shift + F

Mac: + + F

More info here

Solution 2

Actually, you should try double shift, it's search everywhere.

Solution 3

If you look at the "project files" tool window, you can right click a directory and choose "find in path".

Solution 4

There are multiple ways to do this. I am using PyCharm 2019.1, but I bet that it will work in previous versions.

Find in path shortcut:

+ + F (mac) or

Ctrl + + F (windows or linux)

This will open the following in which you can type the word you are looking for.

enter image description here

Find action shortcut

+ + 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.

enter image description here

Right click on your project's directory, and choosing Find in Path...

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.

enter image description here

Solution 5

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.

Share:
44,955

Related videos on Youtube

Ray
Author by

Ray

I'm a Montreal-based software developer with a strong background in Windows development, database development, and web development. I currently specialize in Microsoft's .NET, C#, and MVC technologies with a multitude of successful projects under my belt. After completing my university degree in Computer Science, I began as a computer consultant helping many businesses around Montreal reach their I.T. goals. Now after 20 years of experience, I enjoy developing with the latest web technologies, and constantly learning the newer ones as they come along.

Updated on January 28, 2021

Comments

  • Ray
    Ray over 3 years

    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.

  • saroele
    saroele over 7 years
    This should work according to documentation, but it does not find words in all the files in a project. Ctrl+Shift+F does.
  • dgundersen
    dgundersen over 6 years
    My search (Find in Path) stopped working but clicking "File" > "Invalidate Caches/Restart" fixed it. Just commenting here for anyone else having the same problem.
  • Dmitri
    Dmitri over 4 years
    ... wrong answer. Only searches for particular contexts, not for text in general. "Find in Path" is the answer to the OP's question.