Rename a File and Its References

Change your mind on a file name and the IDE makes all the changes for you.

You made a file. You tried to choose the right filename. You then used it all over your project.

Now you've changed your mind.

It's sitting there, annoying you, but you can't be bothered to find all the places that use it. Search and replace might find a bunch of false positives. You'd really like something that understood symbols, and just in imports.

Select the file and use Refactor | Rename ⌃T (macOS) / Shift+Ctrl+Alt+T (Windows/Linux) and then '1' to change the name of the file and occurrences. This will also adjust VCS. Best of all, if you change your mind, *Undo puts it all back as one editor transaction.


Related Resources

See VCS Changed Lines In Gutter
Quickly spot which parts of your file have changed since the last commit.
Autocomplete Django Settings Strings
Use autocomplete when typing a string in the apps section of your settings file.
Split Screen Without Tabs
Get your code and tests side-by-side without resorting to tabs.