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

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

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

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


当前回答

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

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

其他回答

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

如果以上方法都不适合你,你想要一个简单的ctrl-h绑定到左边的窗格,ctrl-l绑定到右边的窗格,然后这样做:

打开键盘快捷键(Ctrl-k, Ctrl-s) 搜索firstEditorGroup并将workbench.action.focusFirstEditorGroup的键绑定更改为ctrl -h 再次搜索secondEditorGroup并将workbench.action.focusSecondEditorGroup的键绑定更改为ctrl -h

如果您只有两个编辑器窗格,这是一个简单的设置。

https://code.visualstudio.com/docs/customization/keybindings#_editorwindow-management

Windows操作系统:Ctrl+1、Ctrl+2、Ctrl+3。

Mac: Cmd+1, Cmd+2和Cmd+3。

窗格之间没有循环切换,类似于Ctrl+制表符对文件的切换。

对于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"
},