Refactoring
Mermaid Studio provides IDE-powered refactoring tools that help you safely rename nodes and navigate your diagrams.
Rename a Node
Section titled “Rename a Node”To rename a node and automatically update all its references:
- Place your cursor on the node name
- Use one of these methods:
- Press
Shift+F6 - Right-click and select Refactor -> Rename
- Press
- Type the new name
- Press
Enterto apply
All references to that node throughout the diagram are updated automatically.
Find Usages
Section titled “Find Usages”To see everywhere a node is referenced:
- Place your cursor on a node
- Press
Alt+F7(Windows/Linux) orOption+F7(macOS) - Or right-click and select Find Usages
The results appear in a tool window showing all locations where the node is used.
Go to Definition
Section titled “Go to Definition”Click on any node reference while holding:
Ctrl(Windows/Linux)Cmd(macOS)
This navigates directly to where the node is defined.
Supported Diagram Types
Section titled “Supported Diagram Types”Refactoring works best in diagram types with named, reusable elements:
- Flowcharts - Node IDs and subgraph names
- ER Diagrams - Entity names
- Requirements - Requirement and element IDs
- C4 Diagrams - Component names
- Block Diagrams - Block IDs
Other diagram types may have limited or no refactoring support depending on their syntax structure.