Rename Symbol
What is Rename Symbol?
Rename Symbol: Rename a variable, function, or class everywhere it is used — safely, across the project. Rename Symbol changes the name of a variable, function, class or property everywhere it is used, in one safe operation. In VS Code press F2; in JetBrains IDEs press Shift+F6. Unlike find and replace, it understands the code. It renames only that specific symbol, not other things that happen to share the name, and updates imports and references across files.
Frequently asked questions about Rename Symbol
What should you keep in mind with Rename Symbol?
It removes most of the fear from improving names, which is one of the cheapest ways to make code easier to read. A function called process() becomes sendOverdueReminders() in seconds. Dynamic code, such as names built from strings or used in templates and configuration files, may not be found automatically, so run the tests afterwards and search for the old name once to be sure.
At a glance
| Category | Keyboard shortcuts |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |