vscode
vscode copied to clipboard
How to open the lightbulb via shortcut?
I can't find a shortcut for opening the lightbulb / codeActions at the current cursor position. How can I create such a shortcut?
I tried to create a shortcut for vscode.executeCodeActionProvider by creating a custom keybinding like this:
[{ "key": "alt+enter", "command": "vscode.executeCodeActionProvider"}]
But everytime I hit the shortcut I receive the warning
Running the contributed command:'vscode.executeCodeActionProvider' failed.
In mac it's "CMD+." (Command plus period) by default and I guess it should be "Ctrl+." in windows and linux. if you want to change it find:
{ "key": "cmd+.", "command": "editor.action.quickFix", "when": "editorTextFocus" }
Correct, adding @aeschli for further questions regarding quick fix