Rename Symbol

Change a variable name, class name, or other symbol, across the project.

You wrote a function which you use all over the place in a project. Or a class. The name no longer matches its purpose. But the change is too much of a hassle.

The IDE knows where it is used. Even better, it knows the difference between usage in your project vs. finding it in a dependency, and best of all, usage as a symbol vs. just some letters in a string.

What if the same symbol name is used in two Python modules? Yep, PyCharm can tell the difference and only rename to the appropriate the symbol from that module.

Same for method names. Have the same method in two classes? Refactor Rename ⇧F6 (macOS) / Shift+F6 (Windows/Linux) will look in your project for the correct usage and rename it.

Simply put your cursor on a symbol and use Refactor | Rename ⌃T (macOS) / Shift+Ctrl+Alt+T (Windows/Linux) and then '1' Provide the new name, preview the places it found, and select Do Refactor.

Change your mind? Refactoring is done as a single editor transaction, meaning Undo reverts all the places that were renamed.


Related Resources

See VCS Changed Lines In Gutter
Quickly spot which parts of your file have changed since the last commit.
Split Screen Without Tabs
Get your code and tests side-by-side without resorting to tabs.
Run From Keyboard
Use the keyboard to select and run a run configuration.