{
"key": "ctrl+s",
"command": "runCommands",
"args": {
"commands": [
"workbench.action.terminal.sendSequence",
"workbench.action.files.save"
],
"text": "r"
},
"when": "editorTextFocus && !editorReadonly"
}
这是vscode的keybindings.json中的代码,但它没有按预期工作! 仅保存文件而不将“r”发送到终端
我尝试了一切,我只想两者兼得
问题是在使用多个命令时将参数传递给特定命令
{
"key": "ctrl+s",
"command": "runCommands",
"args": {
"commands": [
{
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "r"
}
},
"workbench.action.files.save"
],
},
"when": "editorTextFocus && !editorReadonly"
}