Skip to content

Instantly share code, notes, and snippets.

@brennanMKE
Last active November 17, 2023 04:36
Show Gist options
  • Save brennanMKE/8b0d9e5cb72cbd6380b5 to your computer and use it in GitHub Desktop.
Save brennanMKE/8b0d9e5cb72cbd6380b5 to your computer and use it in GitHub Desktop.
Key bindings for VS Code to work more like Xcode

The workbench in VS Code on the left has 5 buttons so cmd+1 through cmd+5 will select them.

Running the debugger is started with cmd+r and stopping the debugging is done with cmd+. just like Xcode.

[
{
"key": "cmd+1",
"command": "workbench.view.explorer"
},
{
"key": "cmd+2",
"command": "workbench.view.search"
},
{
"key": "cmd+3",
"command": "workbench.view.scm"
},
{
"key": "cmd+4",
"command": "workbench.view.debug"
},
{
"key": "cmd+5",
"command": "workbench.view.extensions"
},
{
"key": "cmd+b",
"command": "workbench.action.tasks.build"
},
{
"key": "cmd+r",
"command": "workbench.action.debug.start",
"when": "!inDebugMode"
},
{
"key": "cmd+r",
"command": "workbench.action.debug.restart",
"when": "inDebugMode"
},
{
"key": "cmd+e",
"command": "workbench.action.tasks.runTask"
},
{
"key": "cmd+.",
"command": "workbench.action.debug.stop",
"when": "inDebugMode"
},
{
"key": "cmd+0",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+-",
"command": "workbench.action.navigateBack"
},
{
"key": "cmd+=",
"command": "workbench.action.navigateForward"
},
{
"key": "cmd+shift+r",
"command": "workbench.action.tasks.runTask"
},
{
"key": "cmd+alt+left",
"command": "editor.foldRecursively"
},
{
"key": "cmd+alt+right",
"command": "editor.unfoldRecursively"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment