我想添加更多的两个以上的键绑定到更多的两个任务。大概5-10岁左右。
现在我有一个:
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+alt+s", "command": "workbench.action.tasks.test" },
{ "key": "ctrl+alt+d", "command": "workbench.action.tasks.build" }
]
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "npm start",
"isTestCommand": true,
"args": ["start"]
},
{
"taskName": "npm dist",
"isBuildCommand": true,
"args": ["run", "dist"]
}
]
}
如何添加更多?
发布于 2017-03-04 20:14:11
使用更新的vscode 1.10版本,您现在可以将键绑定到任何任务。这里是描述这一点的发行版文档。根据链接中的示例,您可以这样做:
{
"key": "ctrl+h",
"command": "workbench.action.tasks.runTask",
"args": "tsc"
}
,它将ctrl+h绑定到名为tsc的任务。
https://stackoverflow.com/questions/42600426
复制相似问题