【问题标题】:VSCode - how to add more keybindings to the integrated terminalVSCode - 如何向集成终端添加更多键绑定
【发布时间】:2016-12-29 11:37:55
【问题描述】:

我已经设法为 VSCode 的集成终端添加了一些键绑定,但还想添加更多。如何添加自己的键绑定?

// Place your key bindings in this file to overwrite the defaults
[
    { "key": "cmd+right",                "command": "workbench.action.terminal.focusNext",
                                            "when": "terminalFocus" },
    { "key": "cmd+left",                "command": "workbench.action.terminal.focusPrevious",
                                            "when": "terminalFocus" },
    { "key": "cmd+delete",                "command": "workbench.action.terminal.deleteAllRight",
                                            "when": "terminalFocus" }
]

前两个有效,但最后一个无效,我猜这是因为集成终端没有此选项。有没有办法添加它?我也想在这里拥有我所有的常规终端键绑定。

【问题讨论】:

    标签: terminal visual-studio-code


    【解决方案1】:
    { 
            "key": "cmd+x",
            "command": "workbench.action.terminal.kill",
            "when": "terminalFocus"
    }
    

    您可能已经知道这个,但以防万一。它只会杀死当前终端,但您可以按几次以获得相同的功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      • 2017-08-11
      • 1970-01-01
      • 2019-01-20
      相关资源
      最近更新 更多