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.

Interested in renaming symbols?

call to action image

You can rename any symbol in your codebase. Check it out!

Learn More


Related Resources

Navigation Bar - All the power!
Navigation Bar - All the power!
The Navigation Bar can do much more than you think!
Clean Up Messy Imports With Optimize Imports
Clean Up Messy Imports With Optimize Imports
Quickly remove any unused imports and more.
Find in Path with the Navigation Bar
Find in Path with the Navigation Bar
Use the Navigation bar and Find in File together and be faster than all of your team members.