Skip to content

Instantly share code, notes, and snippets.

@janjaali
Last active May 25, 2022 11:03
Show Gist options
  • Save janjaali/019aa228dc9333499235b074601e8259 to your computer and use it in GitHub Desktop.
Save janjaali/019aa228dc9333499235b074601e8259 to your computer and use it in GitHub Desktop.
VS Code Keybindings (MacOS)
[
// workbench.action.nextEditor (cmd+right)
{
"key": "ctrl+alt+cmd+9",
"command": "-workbench.action.nextEditor"
},
{
"key": "alt+cmd+right",
"command": "-workbench.action.nextEditor"
},
{
"key": "cmd+right",
"command": "-cursorEnd",
"when": "textInputFocus"
},
{
"key": "cmd+right",
"command": "-gitlens.key.ctrl+right",
"when": "gitlens:key:ctrl+right"
},
{
"key": "cmd+right",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus"
},
{
"key": "cmd+right",
"command": "workbench.action.nextEditor"
},
// workbench.action.previousEditor (cmd+left)
{
"key": "ctrl+alt+cmd+8",
"command": "-workbench.action.previousEditor"
},
{
"key": "alt+cmd+left",
"command": "-workbench.action.previousEditor"
},
{
"key": "cmd+left",
"command": "-cursorHome",
"when": "textInputFocus"
},
{
"key": "cmd+left",
"command": "-gitlens.key.ctrl+left",
"when": "gitlens:key:ctrl+left"
},
{
"key": "cmd+left",
"command": "-list.collapseAll",
"when": "listFocus && !inputFocus"
},
{
"key": "cmd+left",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus"
},
{
"key": "cmd+left",
"command": "workbench.action.previousEditor"
},
// workbench.action.toggleSidebarVisibility (cmd+e)
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+e",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+e",
"command": "-actions.findWithSelection"
},
// editor.fold (cmd+oem_minus)
{
"key": "cmd+-",
"command": "editor.fold"
},
{
"key": "cmd+-",
"command": "-workbench.action.zoomOut"
},
// editor.foldAll (shift+alt+oem_minus)
{
"key": "cmd+k cmd+0",
"command": "-editor.foldAll",
"when": "editorTextFocus && foldingEnabled"
},
{
"key": "shift+alt+-",
"command": "editor.foldAll"
},
// disable zoom behavior
{
"key": "shift+cmd+-",
"command": "-workbench.action.zoomOut"
},
// editor.unfold (cmd+oem_plus)
{
"key": "cmd+[BracketRight]",
"command": "-workbench.action.zoomIn"
},
{
"key": "cmd+[BracketRight]",
"command": "editor.unfold"
},
// editor.unfoldAll (shift+alt+oem_plus)
{
"key": "cmd+k cmd+j",
"command": "-editor.unfoldAll",
"when": "editorTextFocus && foldingEnabled"
},
{
"key": "shift+alt+[BracketRight]",
"command": "editor.unfoldAll"
},
// workbench.action.terminal.toggleTerminal (cmd+t)
{
"key": "ctrl+shift+[Equal]",
"command": "-workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
{
"key": "cmd+t",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "cmd+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "cmd+t",
"command": "-metals.symbol-search",
"when": "editorLangId == 'scala'"
},
// Copy Copy Paste: History (shift+cmd+v)
{
"key": "shift+cmd+v",
"command": "-markdown-preview-enhanced.openPreview",
"when": "editorLangId == 'markdown'"
},
{
"key": "shift+cmd+v",
"command": "-markdown.showPreview",
"when": "!notebookEditorFocused && editorLangId == 'markdown'"
},
{
"key": "shift+cmd+v",
"command": "-notebook.cell.pasteAbove",
"when": "notebookEditorFocused && !inputFocus"
},
{
"key": "shift+cmd+v",
"command": "-markdown.extension.togglePreview",
"when": "!terminalFocus"
},
// workbench.action.navigateBack (ctrl+cmd+left)
{
"key": "ctrl+-",
"command": "-workbench.action.navigateBack"
},
{
"key": "ctrl+cmd+left",
"command": "-workbench.action.terminal.resizePaneLeft",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+cmd+left",
"command": "-workbench.action.moveEditorToPreviousGroup"
},
{
"key": "ctrl+cmd+left",
"command": "workbench.action.navigateBack"
},
// workbench.action.navigateForward (ctrl+cmd+right)
{
"key": "ctrl+shift+-",
"command": "-workbench.action.navigateForward"
},
{
"key": "ctrl+cmd+right",
"command": "-workbench.action.terminal.resizePaneRight",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+cmd+right",
"command": "-workbench.action.moveEditorToNextGroup"
},
{
"key": "ctrl+cmd+right",
"command": "workbench.action.navigateForward"
},
{
"key": "shift+cmd+[Comma] f",
"command": "-testing.runCurrentFile",
"when": "editorTextFocus"
},
// Metals: Test current file (cmd+r t)
{
"key": "cmd+r t",
"command": "metals.run-current-file"
},
// editor.action.smartSelect.expand (shift+cmd+right)
{
"key": "ctrl+shift+right",
"command": "-editor.action.smartSelect.expand",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+cmd+right",
"command": "-editor.action.smartSelect.expand",
"when": "editorTextFocus"
},
{
"key": "shift+cmd+right",
"command": "editor.action.smartSelect.expand"
},
{
"key": "shift+cmd+right",
"command": "-cursorEndSelect",
"when": "textInputFocus"
},
// editor.action.smartSelect.shrink (shift+cmd+right)
{
"key": "ctrl+shift+left",
"command": "-editor.action.smartSelect.shrink",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+cmd+left",
"command": "-editor.action.smartSelect.shrink",
"when": "editorTextFocus"
},
{
"key": "shift+cmd+left",
"command": "editor.action.smartSelect.shrink"
},
{
"key": "shift+cmd+left",
"command": "-cursorHomeSelect",
"when": "textInputFocus"
},
// editor.action.goToImplementation (shift+cmd+b)
{
"key": "cmd+f12",
"command": "-editor.action.goToImplementation",
"when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "shift+cmd+b",
"command": "editor.action.goToImplementation"
},
{
"key": "shift+cmd+b",
"command": "-workbench.action.tasks.build"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment