Skip to content

Instantly share code, notes, and snippets.

@FrankFang
Created March 2, 2026 11:21
Show Gist options
  • Select an option

  • Save FrankFang/676cd2d2d7f9d24afa7f35ded6eb8b0d to your computer and use it in GitHub Desktop.

Select an option

Save FrankFang/676cd2d2d7f9d24afa7f35ded6eb8b0d to your computer and use it in GitHub Desktop.
Use cmd + 1/2/3 to switch between file view, terminal, and scm (terminal is moved to Primary Sidebar)
{
// close scm
{
"key": "cmd+3",
"command": "workbench.action.closeSidebar",
"when": "workbench.scm.active || workbench.scm.visible"
},
// open scm
{
"key": "cmd+3",
"command": "workbench.view.scm",
"when": "!sideBarVisible"
},
// open scm
{
"key": "cmd+3",
"command": "workbench.view.scm",
"when": "sideBarVisible && !view.workbench.scm.visible"
},
// open terminal
{
"key": "cmd+2",
"command": "workbench.action.terminal.toggleTerminal",
"when": "!view.terminal.visible"
},
// open terminal
{
"key": "cmd+2",
"command": "workbench.action.terminal.toggleTerminal",
"when": "sideBarVisible && !view.terminal.visible"
},
// close terminal
{
"key": "cmd+2",
"command": "workbench.action.closeSidebar",
"when": "sideBarVisible && view.terminal.visible"
},
// open fileview
{
"key": "cmd+1",
"command": "workbench.explorer.fileView.focus",
"when": "!view.workbench.explorer.fileView.visible"
},
// close fileview
{
"key": "cmd+1",
"command": "workbench.action.closeSidebar",
"when": "sideBarVisible && view.workbench.explorer.fileView.visible"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment