Skip to content
Get Plugin >

The plugin supports safe rename refactoring that automatically updates all references to a symbol.

Rename any symbol and have all its usages updated automatically:

ActionmacOSWindows/Linux
RenameShift+F6Shift+F6
  • Templates: All component instantiations will be updated
  • Functions: All function calls will be updated
  • Signals: All references within the template will be updated
  • Variables: All uses of the variable will be updated
  • Components: All accesses to the component will be updated

Before:

template OriginalName() {
signal input value;
signal output doubled;
doubled <== value * 2;
}
template Consumer() {
component instance = OriginalName();
instance.value <== x;
}

After renaming OriginalName to Doubler:

template Doubler() {
signal input value;
signal output doubled;
doubled <== value * 2;
}
template Consumer() {
component instance = Doubler();
instance.value <== x;
}
  1. Position cursor on the symbol you want to rename
  2. Press Shift+F6 to start the rename
  3. Type the new name - you’ll see a preview of all changes
  4. Press Enter to apply, or Escape to cancel

For simple renames within a single file, the plugin uses in-place rename:

  1. The symbol becomes editable directly in the editor
  2. All occurrences are highlighted
  3. As you type, all occurrences update in real-time
  4. Press Enter to confirm or Escape to cancel

The plugin validates new names to ensure they’re valid Circom identifiers:

  • Start with a letter, underscore (_), or dollar sign ($)
  • Contain only letters, digits, underscores, or dollar signs

You cannot rename a symbol to a reserved keyword:

pragma, circom, include, template, function, component, main, public, signal, input, output, var, if, else, for, while, do, log, assert, return, parallel, custom, bus

Make one rename, verify it works, then proceed to the next. This makes it easier to revert if something goes wrong.

Take the opportunity when renaming to choose clear, descriptive names:

  • hhasher
  • tmpintermediateHash
  • xinputValue

Always review the preview of changes before confirming, especially for:

  • Templates used across multiple files
  • Commonly used function names
  • Signals with generic names