vscode 系列文章目录 - 终端自定义快捷键配置

vscode 系列文章目录 - 终端配置



前言

在 vscode 中时常需要在多个内嵌终端中进行操作,如 log面板, build面板,package面板和repo面板,其中涉及到自定义快捷键。比如切换终端、创建新终端、改变终端面板大小等操作。


一、终端自定义快捷键

快捷键 Ctrl + Shift + P 输入 Preferences: Open Keyboard shortcurs(JSON),输入:

	// 将键绑定放在此文件中以覆盖默认值auto[]
	// 终端快捷键控制
    { "key": "ctrl+1",  "command": "workbench.action.terminal.focusAtIndex1", "when": "terminalFocus" }, //  Ctrl + 1~9 用于切换终端
    { "key": "ctrl+2",  "command": "workbench.action.terminal.focusAtIndex2", "when": "terminalFocus" },
    { "key": "ctrl+3",  "command": "workbench.action.terminal.focusAtIndex3", "when": "terminalFocus" },
    { "key": "ctrl+4",  "command": "workbench.action.terminal.focusAtIndex4", "when": "terminalFocus" },
    { "key": "ctrl+5",  "command": "workbench.action.terminal.focusAtIndex5", "when": "terminalFocus" },
    { "key": "ctrl+6",  "command": "workbench.action.terminal.focusAtIndex6", "when": "terminalFocus" },
    { "key": "ctrl+7",  "command": "workbench.action.terminal.focusAtIndex7", "when": "terminalFocus" },
    { "key": "ctrl+8",  "command": "workbench.action.terminal.focusAtIndex8", "when": "terminalFocus" },
    { "key": "ctrl+9",  "command": "workbench.action.terminal.focusAtIndex9", "when": "terminalFocus" },
    { "key": "ctrl+t",  "command": "workbench.action.terminal.new" }, // Ctrl + t 用于创建新终端
    { "key": "alt+pageup", "command": "workbench.action.terminal.resizePaneUp", "when": "terminalFocus" }, // Alt + PageUp 面板变大
    { "key": "alt+pagedown", "command": "workbench.action.terminal.resizePaneDown", "when": "terminalFocus" } // Alt + PageDown 面板变小

之后在快捷键 Ctrl + ` 切换到终端界面后,可以使用以上快捷键进行操作。

其中,快捷键的 key 可参考 快捷键 Ctrl + Shift + P 输入 Preferences: Open Keyboard shortcurs(JSON)

相关推荐

  1. vscode 系列文章目录 - 终端定义快捷键配置

    2024-03-28 12:06:01       23 阅读
  2. vscode 快捷键定义

    2024-03-28 12:06:01       22 阅读
  3. vscode 系列文章目录 - c/c++插件配置文件定义

    2024-03-28 12:06:01       20 阅读
  4. VSCode定义配置

    2024-03-28 12:06:01       21 阅读
  5. vscode 系列文章目录 - ctrl+鼠标左键无效

    2024-03-28 12:06:01       21 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-28 12:06:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-28 12:06:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-28 12:06:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-28 12:06:01       20 阅读

热门阅读

  1. 如何在openGauss中使用zhparser

    2024-03-28 12:06:01       20 阅读
  2. vscode 系列文章目录 - ctrl+鼠标左键无效

    2024-03-28 12:06:01       21 阅读
  3. vue nextTick的简化版

    2024-03-28 12:06:01       21 阅读
  4. C#面:选择题:关于try-catch-finally

    2024-03-28 12:06:01       18 阅读
  5. 深入理解 @Transactional 注解在 Spring 中的应用

    2024-03-28 12:06:01       19 阅读
  6. Standard C String & Character(标准c字符和字符串)

    2024-03-28 12:06:01       18 阅读
  7. gitlab创建某个时间点分支

    2024-03-28 12:06:01       21 阅读
  8. 【QT学习笔记】目录 (不定时更新)

    2024-03-28 12:06:01       19 阅读
  9. php程序员如何成为编程高手

    2024-03-28 12:06:01       20 阅读
  10. Vue 实践中的理解

    2024-03-28 12:06:01       21 阅读
  11. Vue 模版编译原理

    2024-03-28 12:06:01       21 阅读
  12. 调用第三方接口:springBoot整合forest

    2024-03-28 12:06:01       26 阅读