vscode icon indicating copy to clipboard operation
vscode copied to clipboard

How to open the lightbulb via shortcut?

Open Wosi opened this issue 11 years ago • 2 comments

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.

Wosi avatar Dec 01 '15 19:12 Wosi

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" }

okian avatar Dec 01 '15 20:12 okian

Correct, adding @aeschli for further questions regarding quick fix

egamma avatar Dec 01 '15 21:12 egamma