Skip to the main content

Visual Studio Code

Rename the current symbol

F2

Mac Desktop app Visual Studio Code default keymap

Practice this

In Visual Studio Code this is rename the current symbol. It applies here: language support available.

Where it works: Language support available

Before it works

  • Language support must be available for the current file.

Every documented variant

Variants of this shortcut
System Environment Keys
Mac Desktop app F2
Windows Desktop app F2

Where this comes from

Visual Studio Code key bindings

Documentation checked on 2026-09-11. That is a documentation review, not a test run inside the application.

Report a correction