I\'m trying to figure out if there is a way to set up a key binding to allow a quick switch between the terminal windows I have open in the built in terminal rather than having
Here's the solution I built that works well for me on OSX.
It mimics the same shortcuts used in the editor to open new files (cmd+n) and switch between tabs (cmd+left|right) and the same shortcuts work for terminals when that view is in focus.
Hit cmd+shift+p and type keyboard to find Preferences: Open Keyboard Shortcuts File
Add the following to the keybindings.json file and save it.
{
"key": "cmd+alt+right",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "cmd+alt+left",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
{
"key": "cmd+n",
"command": "workbench.action.terminal.new",
"when": "terminalFocus"
},
{
"key": "cmd+w",
"command": "workbench.action.terminal.kill",
"when": "terminalFocus"
}
It also does the same for closing terminals (cmd+w)