Skip to content

Instantly share code, notes, and snippets.

@whalemare
Created August 5, 2019 12:45
Show Gist options
  • Save whalemare/9c1512c28b27cac42be0ec07ff97954c to your computer and use it in GitHub Desktop.
Save whalemare/9c1512c28b27cac42be0ec07ff97954c to your computer and use it in GitHub Desktop.
VSCode keybindnings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "cmd+q",
"command": "editor.action.showHover",
"when": "editorTextFocus"
},
{
"key": "cmd+w",
"command": "editor.action.smartSelect.expand",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+cmd+right",
"command": "-editor.action.smartSelect.expand",
"when": "editorTextFocus"
},
{
"key": "alt+w",
"command": "workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups"
},
{
"key": "shift+alt+w",
"command": "workbench.action.closeWindow"
},
{
"key": "shift+cmd+w",
"command": "-workbench.action.closeWindow"
},
{
"key": "shift+cmd+w",
"command": "editor.action.smartSelect.shrink",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+cmd+left",
"command": "-editor.action.smartSelect.shrink",
"when": "editorTextFocus"
},
{
"key": "cmd+1",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+f s",
"command": "actions.findWithSelection"
},
{
"key": "cmd+e",
"command": "-actions.findWithSelection"
},
{
"key": "cmd+e",
"command": "workbench.action.quickOpen"
},
{
"key": "cmd+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "cmd+e",
"command": "workbench.action.quickOpenNavigateNextInFilePicker",
"when": "inFilesPicker && inQuickOpen"
},
{
"key": "cmd+p",
"command": "-workbench.action.quickOpenNavigateNextInFilePicker",
"when": "inFilesPicker && inQuickOpen"
},
{
"key": "cmd+b",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "f12",
"command": "-editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "cmd+b",
"command": "editor.gotoNextSymbolFromResult",
"when": "hasSymbols && config.editor.gotoLocation.multiple == 'goto'"
},
{
"key": "f12",
"command": "-editor.gotoNextSymbolFromResult",
"when": "hasSymbols && config.editor.gotoLocation.multiple == 'goto'"
},
{
"key": "alt+cmd+left",
"command": "workbench.action.navigateBack"
},
{
"key": "ctrl+-",
"command": "-workbench.action.navigateBack"
},
{
"key": "alt+cmd+left",
"command": "workbench.action.quickInputBack",
"when": "inQuickOpen"
},
{
"key": "ctrl+-",
"command": "-workbench.action.quickInputBack",
"when": "inQuickOpen"
},
{
"key": "f12",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+`",
"command": "-workbench.action.terminal.toggleTerminal"
},
{
"key": "alt+enter",
"command": "editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
},
{
"key": "cmd+.",
"command": "-editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
},
{
"key": "cmd+backspace",
"command": "workbench.action.terminal.deleteWordLeft",
"when": "terminalFocus"
},
{
"key": "alt+backspace",
"command": "-workbench.action.terminal.deleteWordLeft",
"when": "terminalFocus"
},
{
"key": "cmd+backspace",
"command": "deleteWordLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "alt+backspace",
"command": "-deleteWordLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "alt+backspace",
"command": "deleteAllLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "cmd+backspace",
"command": "-deleteAllLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "alt+backspace",
"command": "workbench.action.terminal.deleteToLineStart",
"when": "terminalFocus"
},
{
"key": "cmd+backspace",
"command": "-workbench.action.terminal.deleteToLineStart",
"when": "terminalFocus"
},
{
"key": "alt+space",
"command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
},
{
"key": "ctrl+space",
"command": "-editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
},
{
"key": "alt+space",
"command": "toggleSuggestionDetails",
"when": "suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+space",
"command": "-toggleSuggestionDetails",
"when": "suggestWidgetVisible && textInputFocus"
},
{
"key": "cmd+left",
"command": "breadcrumbs.focusPrevious",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "alt+left",
"command": "-breadcrumbs.focusPrevious",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "cmd+left",
"command": "breadcrumbs.focusPreviousWithPicker",
"when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus"
},
{
"key": "alt+left",
"command": "-breadcrumbs.focusPreviousWithPicker",
"when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus"
},
{
"key": "cmd+left",
"command": "cursorWordStartLeft",
"when": "textInputFocus"
},
{
"key": "alt+left",
"command": "-cursorWordStartLeft",
"when": "textInputFocus"
},
{
"key": "cmd+left",
"command": "gitlens.key.left",
"when": "gitlens:key:left"
},
{
"key": "alt+left",
"command": "-gitlens.key.left",
"when": "gitlens:key:left"
},
{
"key": "cmd+right",
"command": "breadcrumbs.focusNext",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "alt+right",
"command": "-breadcrumbs.focusNext",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "cmd+right",
"command": "breadcrumbs.focusNextWithPicker",
"when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus"
},
{
"key": "alt+right",
"command": "-breadcrumbs.focusNextWithPicker",
"when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus"
},
{
"key": "cmd+right",
"command": "cursorWordEndRight",
"when": "textInputFocus"
},
{
"key": "alt+right",
"command": "-cursorWordEndRight",
"when": "textInputFocus"
},
{
"key": "cmd+right",
"command": "gitlens.key.right",
"when": "gitlens:key:right"
},
{
"key": "alt+right",
"command": "-gitlens.key.right",
"when": "gitlens:key:right"
},
{
"key": "alt+right",
"command": "workbench.action.terminal.moveToLineEnd",
"when": "terminalFocus"
},
{
"key": "cmd+right",
"command": "-workbench.action.terminal.moveToLineEnd",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "cursorEnd",
"when": "textInputFocus"
},
{
"key": "cmd+right",
"command": "-cursorEnd",
"when": "textInputFocus"
},
{
"key": "alt+left",
"command": "workbench.action.terminal.moveToLineStart",
"when": "terminalFocus"
},
{
"key": "cmd+left",
"command": "-workbench.action.terminal.moveToLineStart",
"when": "terminalFocus"
},
{
"key": "alt+left",
"command": "cursorHome",
"when": "textInputFocus"
},
{
"key": "cmd+left",
"command": "-cursorHome",
"when": "textInputFocus"
},
{
"key": "cmd+k",
"command": "git.commitAll"
},
{
"key": "shift+cmd+k",
"command": "git.push"
},
{
"key": "cmd+g",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "cmd+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "cmd+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+cmd+n",
"command": "explorer.newFolder"
},
{
"key": "cmd+n",
"command": "explorer.newFile"
},
{
"key": "shift+alt+cmd+w",
"command": "workbench.action.newWindow"
},
{
"key": "shift+cmd+n",
"command": "-workbench.action.newWindow"
},
{
"key": "shift+cmd+o",
"command": "editor.action.organizeImports",
"when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)source\\.organizeImports\\b/"
},
{
"key": "shift+alt+o",
"command": "-editor.action.organizeImports",
"when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)source\\.organizeImports\\b/"
},
{
"key": "shift+cmd+o",
"command": "-workbench.action.gotoSymbol"
},
{
"key": "shift+cmd+f",
"command": "workbench.view.search",
"when": "!searchViewletVisible"
},
{
"key": "shift+cmd+f",
"command": "-workbench.view.search",
"when": "!searchViewletVisible"
},
{
"key": "ctrl+f",
"command": "repl.action.filter",
"when": "inDebugRepl && textInputFocus"
},
{
"key": "cmd+f",
"command": "-repl.action.filter",
"when": "inDebugRepl && textInputFocus"
},
{
"key": "ctrl+f",
"command": "workbench.action.terminal.focusFindWidget",
"when": "terminalFocus"
},
{
"key": "cmd+f",
"command": "-workbench.action.terminal.focusFindWidget",
"when": "terminalFocus"
},
{
"key": "ctrl+f",
"command": "workbench.action.terminal.focusFindWidget",
"when": "terminalFindWidgetFocused"
},
{
"key": "cmd+f",
"command": "-workbench.action.terminal.focusFindWidget",
"when": "terminalFindWidgetFocused"
},
{
"key": "ctrl+f",
"command": "editor.action.extensioneditor.showfind",
"when": "activeEditor == 'workbench.editor.extension'"
},
{
"key": "cmd+f",
"command": "-editor.action.extensioneditor.showfind",
"when": "activeEditor == 'workbench.editor.extension'"
},
{
"key": "ctrl+f",
"command": "editor.action.webvieweditor.showFind",
"when": "!editorFocus && activeEditor == 'WebviewEditor'"
},
{
"key": "cmd+f",
"command": "-editor.action.webvieweditor.showFind",
"when": "!editorFocus && activeEditor == 'WebviewEditor'"
},
{
"key": "ctrl+f",
"command": "keybindings.editor.searchKeybindings",
"when": "inKeybindings"
},
{
"key": "cmd+f",
"command": "-keybindings.editor.searchKeybindings",
"when": "inKeybindings"
},
{
"key": "ctrl+f",
"command": "problems.action.focusFilter",
"when": "problemsViewFocus"
},
{
"key": "cmd+f",
"command": "-problems.action.focusFilter",
"when": "problemsViewFocus"
},
{
"key": "ctrl+f",
"command": "settings.action.search",
"when": "inSettingsEditor"
},
{
"key": "cmd+f",
"command": "-settings.action.search",
"when": "inSettingsEditor"
},
{
"key": "alt+cmd+q",
"command": "workbench.action.quit"
},
{
"key": "cmd+q",
"command": "-workbench.action.quit"
},
{
"key": "cmd+q",
"command": "workbench.action.openDocumentationUrl"
},
{
"key": "cmd+f",
"command": "actions.find",
"when": "editorFocus"
},
{
"key": "cmd+f",
"command": "-actions.find"
},
{
"key": "cmd+p",
"command": "editor.action.triggerParameterHints",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
},
{
"key": "shift+cmd+space",
"command": "-editor.action.triggerParameterHints",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment