Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amelio-vazquez-reina/1ab8ea2ce3ad1b4c33deb53ea76b622c to your computer and use it in GitHub Desktop.
Save amelio-vazquez-reina/1ab8ea2ce3ad1b4c33deb53ea76b622c to your computer and use it in GitHub Desktop.
VSCode keybindings.json (11/10/19)
[
{
"key": "cmd+ctrl+r",
"command": "workbench.action.navigateRight"
},
{
"key": "cmd+ctrl+l",
"command": "workbench.action.navigateLeft"
},
{
"key": "cmd+ctrl+i",
"command": "workbench.action.navigateUp"
},
{
"key": "cmd+ctrl+k",
"command": "workbench.action.navigateDown"
},
// Emacs
{
"key": "cmd+f",
"command": "emacs-mcx.forwardWord",
"when": "editorTextFocus", // Not sure if this really works
},
{
"key": "cmd+f",
"command": "emacs-mcx.forwardWord",
"when": "terminalFocus"
},
{
"key": "alt+f",
"command": "-emacs-mcx.forwardWord",
"when": "editorTextFocus"
},
{
"key": "cmd+b",
"command": "emacs-mcx.backwardWord",
"when": "editorTextFocus"
},
{
"key": "alt+b",
"command": "-emacs-mcx.backwardWord",
"when": "editorTextFocus"
},
{
"key": "cmd+a",
"command": "spaceBlockJumper.moveUp"
},
{
"key": "cmd+e",
"command": "spaceBlockJumper.moveDown"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeActiveEditor"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeGroup",
"when": "activeEditorGroupEmpty && multipleEditorGroups"
},
{
"key": "cmd+w",
"command": "-workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups"
},
{
"key": "cmd+w",
"command": "emacs-mcx.copyRegion",
"when": "editorTextFocus"
},
{
"key": "alt+w",
"command": "-emacs-mcx.copyRegion",
"when": "editorTextFocus"
},
{
"key": "cmd+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "cmd+d",
"command": "emacs-mcx.killWord",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+d",
"command": "-emacs-mcx.killWord",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+k up",
"command": "-workbench.action.moveActiveEditorGroupUp"
},
{
"key": "cmd+k shift+cmd+left",
"command": "-workbench.action.moveEditorLeftInGroup"
},
{
"key": "cmd+k shift+cmd+right",
"command": "-workbench.action.moveEditorRightInGroup"
},
{
"key": "cmd+k right",
"command": "-workbench.action.moveActiveEditorGroupRight"
},
{
"key": "cmd+k left",
"command": "-workbench.action.moveActiveEditorGroupLeft"
},
{
"key": "ctrl+cmd+j",
"command": "workbench.action.focusLeftGroup"
},
{
"key": "cmd+k cmd+left",
"command": "-workbench.action.focusLeftGroup"
},
{
"key": "ctrl+cmd+l",
"command": "workbench.action.focusRightGroup"
},
{
"key": "cmd+k cmd+right",
"command": "-workbench.action.focusRightGroup"
},
{
"key": "ctrl+cmd+k",
"command": "workbench.action.focusBelowGroup"
},
{
"key": "cmd+k cmd+down",
"command": "-workbench.action.focusBelowGroup"
},
{
"key": "ctrl+cmd+f",
"command": "-workbench.action.toggleFullScreen"
},
{
"key": "ctrl+cmd+f",
"command": "workbench.action.minimizeOtherEditors"
},
{
"key": "shift+cmd+t",
"command": "workbench.action.terminal.focus"
},
{
"key": "shift+cmd+,",
"command": "cursorTop",
"when": "textInputFocus"
},
{
"key": "cmd+up",
"command": "-cursorTop",
"when": "textInputFocus"
},
// {
// "key": "ctrl+x ctrl+b",
// "command": "breadcrumbs.focus",
// "when": "breadcrumbsPossible"
// },
{
"key": "shift+cmd+;",
"command": "-breadcrumbs.focus",
"when": "breadcrumbsPossible"
},
{
"key": "ctrl+l",
"command": "breadcrumbs.focusNext",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "alt+right",
"command": "-breadcrumbs.focusNext",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "ctrl+r",
"command": "breadcrumbs.focusPrevious",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "alt+left",
"command": "-breadcrumbs.focusPrevious",
"when": "breadcrumbsActive && breadcrumbsVisible"
},
{
"key": "shift+cmd+.",
"command": "-breadcrumbs.toggleToOn",
"when": "!config.breadcrumbs.enabled"
},
{
"key": "shift+cmd+.",
"command": "-editor.action.inPlaceReplace.down",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+n",
"command": "cursorDown",
"when": "textInputFocus"
},
{
"key": "down",
"command": "-cursorDown",
"when": "textInputFocus"
},
{
"key": "shift+cmd+.",
"command": "cursorBottom",
"when": "textInputFocus"
},
{
"key": "cmd+down",
"command": "-cursorBottom",
"when": "textInputFocus"
},
{
"key": "ctrl+c ctrl+b",
"command": "breadcrumbs.focusAndSelect",
"when": "breadcrumbsPossible"
},
{
"key": "shift+cmd+.",
"command": "-breadcrumbs.focusAndSelect",
"when": "breadcrumbsPossible"
},
{
"key": "cmd+v",
"command": "-editor.action.clipboardPasteAction",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "cmd+v",
"command": "-editor.action.webvieweditor.paste",
"when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
},
{
"key": "ctrl+y",
"command": "markdown.extension.editing.paste",
"when": "editorHasSelection && editorTextFocus && editorLangId == 'markdown'"
},
{
"key": "cmd+v",
"command": "-markdown.extension.editing.paste",
"when": "editorHasSelection && editorTextFocus && editorLangId == 'markdown'"
},
{
"key": "ctrl+y",
"command": "filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "cmd+v",
"command": "-filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+v",
"command": "emacs-mcx.scrollUpCommand",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "ctrl+v",
"command": "-emacs-mcx.scrollUpCommand",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "cmd+v",
"command": "emacs-mcx.scrollDownCommand",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "alt+v",
"command": "-emacs-mcx.scrollDownCommand",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "pageup",
"command": "-emacs-mcx.scrollDownCommand",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "pagedown",
"command": "-emacs-mcx.scrollUpCommand",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "ctrl+x s",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+alt+space",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+j",
"command": "-workbench.action.togglePanel"
},
{
"key": "ctrl+x p",
"command": "workbench.action.togglePanel"
},
{
"key": "ctrl+x j",
"command": "-workbench.action.togglePanel"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+cmd+w",
"command": "-workbench.action.toggleTabsVisibility"
// This one we use
},
{
"key": "alt+z",
"command": "-editor.action.toggleWordWrap"
},
{
"key": "cmd+k z",
"command": "-workbench.action.toggleZenMode"
},
{
"key": "ctrl+x f",
"command": "workbench.action.toggleFullScreen"
// This is just general full screen (not maximizing anything)
},
// NAVIGATION
{ "key": "cmd+j cmd+e",
"command": "workbench.action.focusActiveEditorGroup",
},
{
"key": "cmd+j cmd+p",
"command": "workbench.action.focusPanel"
},
{
"key": "cmd+j cmd+s",
"command": "workbench.action.focusSideBar"
},
// TOGGLING MAXIMIZATION:
{ // Panel
"key": "cmd+j cmd+f",
"command": "workbench.action.toggleMaximizedPanel"
},
//{
// "key": "ctrl+x e",
// "command": "workbench.action.toggleEditorVisibility"
//},
{
"key": "ctrl+1",
"command": "-workbench.action.openEditorAtIndex1"
},
{
"key": "ctrl+cmd+y",
"command": "workbench.action.maximizeEditor"
},
{
"key": "shift+cmd+u",
"command": "-workbench.action.output.toggleOutput"
},
{
"key": "cmd+a",
"command": "-editor.action.selectAll",
"when": "textInputFocus"
},
{
"key": "cmd+a",
"command": "-workbench.action.terminal.selectAll",
"when": "terminalFocus"
},
{
"key": "cmd+0",
"command": "-workbench.action.focusSideBar"
},
{
"key": "ctrl+i",
"command": "workbench.action.terminal.focusFindWidget",
"when": "terminalFocus || terminalFindWidgetFocused"
},
{
"key": "cmd+f",
"command": "-workbench.action.terminal.focusFindWidget",
"when": "terminalFocus"
},
{
"key": "cmd+f",
"command": "-workbench.action.terminal.focusFindWidget",
"when": "terminalFindWidgetFocused"
},
{
"key": "cmd+k cmd+e",
"command": "workbench.files.action.focusOpenEditorsView",
"when": "workbench.explorer.openEditorsView.active"
},
{
"key": "cmd+k e",
"command": "-workbench.files.action.focusOpenEditorsView",
"when": "workbench.explorer.openEditorsView.active"
},
{
"key": "cmd+k cmd+g",
"command": "workbench.view.scm",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g",
"command": "-workbench.view.scm",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+s",
"command": "actions.find"
},
{
"key": "cmd+f",
"command": "-actions.find"
},
{
"key": "cmd+k cmd+x",
"command": "workbench.view.extensions"
},
{
"key": "shift+cmd+x",
"command": "-workbench.view.extensions"
},
{
"key": "ctrl+c ctrl+o",
"command": "extension.openFileFromPath",
"when": "!terminalFocus"
},
{
"key": "alt+d",
"command": "-extension.openFileFromPath",
"when": "!terminalFocus"
},
{
"key": "ctrl+n",
"command": "emacs-mcx.nextLine",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "down",
"command": "-emacs-mcx.nextLine",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{
"key": "alt+right",
"command": "-cursorWordEndRight",
"when": "textInputFocus"
},
{
"key": "alt+right",
"command": "-cursorWordAccessibilityRight",
"when": "accessibilityModeEnabled && textInputFocus"
},
// Word navigation in the Terminal
// Via https://stackoverflow.com/questions/58476611/forward-backward-words-in-the-vscode-terminal/58477220#58477220
{
"key": "cmd+b",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u001b[1;5D"
},
"when": "terminalFocus && !terminalTextSelected"
},
{
"key": "cmd+f",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u001b[1;5C"
},
"when": "terminalFocus && !terminalTextSelected"
},
{
"key": "ctrl+c ctrl+k",
"command": "workbench.action.closeEditorsAndGroup"
},
{
"key": "ctrl+j ctrl+k",
"command": "org.doPromote",
"when": "editorLangId == 'org'"
},
{
"key": "ctrl+alt+o shift+p",
"command": "-org.doPromote",
"when": "editorLangId == 'org'"
},
{
"key": "ctrl+j ctrl+k",
"command": "org.promoteSubtree",
"when": "editorLangId == 'org'"
},
{
"key": "ctrl+alt+o p",
"command": "-org.promoteSubtree",
"when": "editorLangId == 'org'"
},
{
"key": "ctrl+x e",
"command": "workbench.action.toggleEditorVisibility"
},
{
"key": "cmd+k cmd+e",
"command": "workbench.view.explorer"
},
{
"key": "shift+cmd+e",
"command": "-workbench.view.explorer"
},
{
"key": "ctrl+c ctrl+p",
"command": "git.push"
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment