Open
Description
This page has a list of commands: https://code.visualstudio.com/api/references/commands
All of them can be executed from extension with vscode.commands.executeCommand
, but some of them can be used from keybindings.json
file with "args", like vscode.setEditorLayout
or editorScroll
. The list is not complete, though.
I think this page should contain all commands that accept arguments.
2 notes:
keybindings.json
: not possible to run some commands likevscode.openFolder
- extension api: For specific commands api would be a preferable choice
For instance, there is a command that supports accepting args
{
"key": "ctrl+enter",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "npm run build\r"
},
"when": "terminalFocus"
},
And it's pretty useful for users, but if you are an extension author - then the api Terminal.sendText()
is most likely what you need.