Skip to content

Instantly share code, notes, and snippets.

@cmccormack
Last active May 11, 2025 22:11
Show Gist options
  • Save cmccormack/0d5caf94137ade0e625e56953928e5c3 to your computer and use it in GitHub Desktop.
Save cmccormack/0d5caf94137ade0e625e56953928e5c3 to your computer and use it in GitHub Desktop.
// Adds keybindings for changing focus between terminals, add new terminal, and killing focused terminal
[
{
"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"
}
]
// Toggle between terminal and editor focus - https://stackoverflow.com/a/43012779
[
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus"
},
{
"key": "ctrl+`",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
}
]
@cmccormack
Copy link
Author

Taken from This answer on StackOverflow, as I could not get the built-in keybindings to work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment