Search Everywhere for Comments in Pycharm

Viewed 1831

Pycharm Search Everywhere function easily allows the user to search everywhere for source code in every file of the project. However it is not able to search for comments, is there a way around that problem?.

enter image description here

I usually leave important comments of lessons learned or links to stack overflow containing helpfull code, and would love a way to easily serach for these comments, when I forget where I wrote them.

Thanks for Reading

3 Answers

After Ctrl + Shift + F you need this button:

enter image description here

And select in comments.

I once had a problem with Search Everywhere or Find in Path(Ctrl + Shift + F for windows) i.e. project wide search for a django project in Pycharm Professional 2020.1.
Although filter was selected as Anywhere, still some were not being found in the project files which were actually there.

But after invalidating caches & restarting like the picture, everything was fine.

First select Invalidate Caches / Restart... in File menu.
enter image description here

Then click Invalidate and Restart in the Invalidate Caches popup window.
enter image description here

Related