I have this simple situation. I\'d like to refactor the name of the role variable:
It looks like Visual Studio Code is smart enough to know that \"roles\" in th
To open your user and workspace settings, use the following Visual Studio Code menu command:
On Windows/Linux: Menu File → Preferences → Settings. On macOS: Code → Preferences → Settings.
You can also open the Settings editor from the Command Palette (Ctrl + Shift + P) with Preferences, open Settings or use the keyboard shortcut (Ctrl + ,).
In the search bar, enter settings.json
, and add this below code:
{
"command": "editor.action.changeAll",
"key": "ctrl+f2",
"when": "editorTextFocus && !editorReadonly"
}
and
{
"command": "editor.action.rename",
"key": "f2",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
}
In the keybindings.
F2 appears to work across all files, and Ctrl + F2 in the current file only.