You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何设置VS Code仅在活动编辑器组内循环切换标签?

解决VS Code拆分视图内Ctrl+Tab组内循环切换标签的问题

VS Code默认的Ctrl+Tab/Ctrl+Shift+Tab行为是跨所有编辑器组切换标签,没有内置开关直接改成组内循环,但可以通过自定义快捷键实现需求:

  1. 打开快捷键配置
    按下Ctrl+K Ctrl+S打开键盘快捷方式面板,或者点击左下角设置图标 → 选择「键盘快捷方式」。

  2. 替换默认快捷键绑定
    默认情况下,Ctrl+Tab绑定的是workbench.action.openPreviousEditor,Ctrl+Shift+Tab绑定的是workbench.action.openNextEditor,这两个命令会跨组切换。我们需要替换成组内专属命令:

    • 搜索workbench.action.nextEditorInGroup,将其快捷键设置为Ctrl+Tab
    • 搜索workbench.action.previousEditorInGroup,将其快捷键设置为Ctrl+Shift+Tab
    • 找到原默认绑定,右键选择「移除键绑定」即可取消跨组切换的旧行为
  3. 直接编辑keybindings.json(可选)
    若习惯手动编辑配置,点击快捷键面板右上角的{}图标打开keybindings.json,添加以下内容:

    [
        {
            "key": "ctrl+tab",
            "command": "workbench.action.nextEditorInGroup",
            "when": "editorFocus"
        },
        {
            "key": "ctrl+shift+tab",
            "command": "workbench.action.previousEditorInGroup",
            "when": "editorFocus"
        },
        {
            "key": "ctrl+tab",
            "command": "-workbench.action.openPreviousEditor"
        },
        {
            "key": "ctrl+shift+tab",
            "command": "-workbench.action.openNextEditor"
        }
    ]
    

设置完成后,Ctrl+Tab和Ctrl+Shift+Tab就只会在当前活动的编辑器组内循环切换标签,不会跳转到其他组。

内容的提问来源于stack exchange,提问作者amitkulk123

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 15:55:27