首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >带有键绑定的VSCode多个/多个任务

带有键绑定的VSCode多个/多个任务
EN

Stack Overflow用户
提问于 2017-03-04 19:32:40
回答 1查看 143关注 0票数 0

我想添加更多的两个以上的键绑定到更多的两个任务。大概5-10岁左右。

现在我有一个:

代码语言:javascript
运行
复制
// 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"]
        }
    ]
}

如何添加更多?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-03-04 20:14:11

使用更新的vscode 1.10版本,您现在可以将键绑定到任何任务。这里是描述这一点的发行版文档。根据链接中的示例,您可以这样做:

代码语言:javascript
运行
复制
{
    "key": "ctrl+h",
    "command": "workbench.action.tasks.runTask",
    "args": "tsc"
}

,它将ctrl+h绑定到名为tsc的任务。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42600426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档