Skip to content

Instantly share code, notes, and snippets.

@adduc
Created July 22, 2024 19:35
Show Gist options
  • Save adduc/ef09bba1b0722422b4a03a844687cec6 to your computer and use it in GitHub Desktop.
Save adduc/ef09bba1b0722422b4a03a844687cec6 to your computer and use it in GitHub Desktop.
[
// When no terminals are open, open a new terminal
{
"key": "ctrl+`",
"command": "workbench.action.terminal.new",
"when": "!terminalCount"
},
// When at least one terminal is open, focus on the terminal
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus",
"when": "terminalCount"
},
// When focus is currently on terminal, switch to the previous editor
{
"key": "ctrl+`",
"command": "workbench.action.openPreviousRecentlyUsedEditor",
"when": "terminalFocus"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment