Visual Studio Code有一个热键组合来将当前窗口分割为2或3个窗格:

"key": "ctrl + \",               "command": "workbench.action.splitEditor"

不幸的是,我无法在没有鼠标的情况下在这些窗格之间切换。我以前用F6的习惯也不管用了。

Visual Studio代码编辑器是否支持它?


当前回答

对于Mac用户和最新的VS Code 1.17:

在窗格之间切换- Cmd+[1,2,3…],其中1,2,3为窗格号 在所有打开的文件之间循环:

前进- Cmd+Shift+] 倒数- Cmd+Shift+[

其他回答

对于Mac用户和最新的VS Code 1.17:

在窗格之间切换- Cmd+[1,2,3…],其中1,2,3为窗格号 在所有打开的文件之间循环:

前进- Cmd+Shift+] 倒数- Cmd+Shift+[

你要找的是workbench.action.terminal.focusNextPane:

{ 
  "key": "alt+down",
  "command": "workbench.action.terminal.focusNextPane",
  "when": "terminalFocus"
},
{ 
  "key": "alt+right",
  "command": "workbench.action.terminal.focusNextPane",
  "when": "terminalFocus"
},

Alt+←和Alt+→在Windows上可以开箱即用。它只会在分屏窗格之间切换,不会重新激活窗格内的非活动文件。

使用F6在编辑器组之间循环

窗格之间有一个圆形开关。它叫做“编辑组之间的循环”。

开箱即用,它是未分配的。我们可以把它赋给F6。

打开Visual Studio代码。 进入文件>首选项>键盘快捷方式。 将以下条目添加到keybindings.json中。 您不必重新启动代码。它已经起作用了。

keybindings.json

// Place your key bindings in this file to overwrite the defaults
[
    {
        "key": "f6", 
        "command": "workbench.action.navigateEditorGroups" 
    }
]

另外

或者,使用开箱窗口管理热键。

Ctrl +1聚焦到左编辑器组 Ctrl +2聚焦到侧边编辑器组 Ctrl +3聚焦到右编辑组 Ctrl+ K Ctrl+左聚焦到左边的编辑器组 Ctrl+ K Ctrl+右聚焦到右边的编辑器组

cmd + option +左/右箭头为我工作。