Skip to content

Instantly share code, notes, and snippets.

@richardpark-msft
Last active December 6, 2024 01:16
Show Gist options
  • Select an option

  • Save richardpark-msft/f2d8a07ffed284b7a61acb9e174f76e8 to your computer and use it in GitHub Desktop.

Select an option

Save richardpark-msft/f2d8a07ffed284b7a61acb9e174f76e8 to your computer and use it in GitHub Desktop.
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+alt+c",
"command": "workbench.debug.action.focusCallStackView"
},
{
"key": "ctrl+shift+f9",
"command": "editor.debug.action.selectionToWatch"
},
{
"key": "ctrl+alt+w",
"command": "workbench.debug.action.focusWatchView"
},
// {
// "key": "ctrl+alt-l",
// "command": "workbench.action.toggleSidebarVisibility"
// },
{
"key": "ctrl+alt+b",
"command": "editor.action.revealDefinitionAside",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+k f12",
"command": "-editor.action.revealDefinitionAside",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+b",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "f12",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+m ctrl+m",
"command": "editor.fold",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+m ctrl+o",
"command": "editor.unfold",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+shift+j",
"command": "workbench.action.quickOpenTerm"
},
// Toggle between terminal and editor focus
{
"key": "ctrl+j",
"command": "workbench.action.terminal.focus"
},
{
"key": "ctrl+j",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "ctrl+w",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "alt+2",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "ctrl+o",
"command": "workbench.action.files.openFile"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "workbench.action.compareEditor.nextChange",
"when": "textCompareEditorVisible"
},
{
"key": "alt+up",
"command": "workbench.action.compareEditor.previousChange",
"when": "textCompareEditorVisible"
},
{
"key": "ctrl+alt+;",
"command": "bookmarks.listFromAllFiles"
},
{
"key": "shift+f12",
"command": "references-view.find",
"when": "editorHasReferenceProvider"
},
{
"key": "shift+up",
"command": "workbench.action.terminal.scrollUp",
"when": "terminalFocus"
},
{
"key": "ctrl+alt+pageup",
"command": "-workbench.action.terminal.scrollUp",
"when": "terminalFocus"
},
{
"key": "shift+down",
"command": "workbench.action.terminal.scrollDown",
"when": "terminalFocus"
},
{
"key": "ctrl+alt+pagedown",
"command": "-workbench.action.terminal.scrollDown",
"when": "terminalFocus"
},
{
"key": "ctrl+`",
"command": "-workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+shift+f2",
"command": "workbench.action.terminal.rename"
},
{
"key": "ctrl+shift+[",
"command": "-editor.fold",
"when": "editorTextFocus && foldingEnabled"
},
{
"key": "ctrl+]",
"command": "editor.action.jumpToBracket",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+]",
"command": "editor.action.selectToBracket",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+\\",
"command": "-editor.action.jumpToBracket",
"when": "editorTextFocus"
},
{
"key": "ctrl+\\",
"command": "-workbench.action.splitEditor"
},
{
"key": "shift+f12",
"command": "-editor.action.referenceSearch.trigger",
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
},
{
"key": "ctrl+shift+t",
"command": "workbench.action.tasks.test"
},
{
"key": "ctrl+k ctrl+s",
"command": "-workbench.action.openGlobalKeybindings"
},
{
"key": "ctrl+k ctrl+s",
"command": "git.stageSelectedRanges",
"when": "isInDiffEditor"
},
{
"key": "ctrl+k ctrl+alt+s",
"command": "-git.stageSelectedRanges",
"when": "isInDiffEditor"
},
//
// gitlens
//
{
"key": "ctrl+\\ b",
"command": "gitlens.toggleFileBlame",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/"
},
{
"key": "ctrl+\\ shift+b",
"command": "gitlens.toggleCodeLens",
"when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ -",
"command": "gitlens.showLastQuickPick",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ /",
"command": "gitlens.showCommitSearch",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ h",
"command": "gitlens.showQuickFileHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ shift+h",
"command": "gitlens.showQuickRepoHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ s",
"command": "gitlens.showQuickRepoStatus",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ c",
"command": "gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\ .",
"command": "gitlens.diffWithNext",
"when": "editorTextFocus && !isInDiffEditor && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+\\ .",
"command": "gitlens.diffWithNext",
"when": "editorTextFocus && isInDiffRightEditor && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+\\ .",
"command": "gitlens.diffWithNextInDiffLeft",
"when": "editorTextFocus && isInDiffLeftEditor && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+\\ ,",
"command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && !isInDiffEditor && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+\\ ,",
"command": "gitlens.diffWithPrevious",
"when": "editorTextFocus && isInDiffLeftEditor && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+\\ ,",
"command": "gitlens.diffWithPreviousInDiffRight",
"when": "editorTextFocus && isInDiffRightEditor && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+\\ shift+,",
"command": "gitlens.diffLineWithPrevious",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+\\ shift.",
"command": "gitlens.diffWithWorking",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+\\ w",
"command": "gitlens.diffLineWithWorking",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+\\ g",
"command": "workbench.view.scm",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g .",
"command": "-gitlens.diffWithNext",
"when": "editorTextFocus && !isInDiffEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g",
"command": "workbench.view.scm",
"when": "workbench.scm.active"
},
{
"key": "ctrl+shift+g .",
"command": "-gitlens.diffWithNext",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g ,",
"command": "-gitlens.diffWithPrevious",
"when": "editorTextFocus && !isInDiffEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g ,",
"command": "-gitlens.diffWithPrevious",
"when": "editorTextFocus && isInDiffLeftEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g ,",
"command": "-gitlens.diffWithPreviousInDiffRight",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g .",
"command": "-gitlens.diffWithNextInDiffLeft",
"when": "editorTextFocus && isInDiffLeftEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g shift+b",
"command": "-gitlens.toggleCodeLens",
"when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g shift+.",
"command": "-gitlens.diffWithWorking",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g shift+,",
"command": "-gitlens.diffLineWithPrevious",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g w",
"command": "-gitlens.diffLineWithWorking",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g /",
"command": "-gitlens.showCommitSearch",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g c",
"command": "-gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g shift+h",
"command": "-gitlens.showQuickRepoHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g h",
"command": "-gitlens.showQuickFileHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g -",
"command": "-gitlens.showLastQuickPick",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g s",
"command": "-gitlens.showQuickRepoStatus",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g b",
"command": "-gitlens.toggleFileBlame",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /blameable/"
},
{
"key": "ctrl+shift+g g",
"command": "-workbench.view.scm",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+\\",
"command": "go.test.cursorOrPrevious",
//"command": "go.subtest.cursor",
},
{
"key": "ctrl+alt+\\",
"command": "go.subtest.cursor"
},
{
"key": "ctrl+shift+alt+\\",
"command": "go.debug.subtest.cursor"
},
{
"key": "ctrl+[",
"command": "testing.runAtCursor",
},
{
"key": "ctrl+shift+[",
"command": "testing.debugAtCursor",
},
{
"key": "ctrl+shift+\\",
// "command": "go.debug.subtest.cursor",
"command": "go.debug.cursor",
},
{
"key": "ctrl+alt+l",
"command": "-bookmarks.jumpToNext",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+l",
"command": "bookmarks.list"
},
{
"key": "ctrl+k",
"command": "deleteAllRight",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+; o",
"command": "git.openFile",
"when": "textCompareEditorVisible"
},
{
"key": "ctrl+shift+; t",
"command": "workbench.view.testing.focus"
},
{
"key": "ctrl+shift+; c",
"command": "workbench.action.openQuickChat.copilot"
},
{
"key": "ctrl+shift+w",
"command": "-workbench.action.closeWindow"
},
{
"key": "ctrl+alt+j",
"command": "workbench.action.terminal.moveToEditor"
},
{
"key": "ctrl+shift+; c",
"command": "workbench.action.openQuickChat"
},
{
"key": "alt+2",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "ctrl+k enter",
"command": "workbench.action.unpinEditor",
"when": "activeEditorIsPinned"
},
{
"key": "ctrl+k enter",
"command": "workbench.action.pinEditor",
"when": "!activeEditorIsPinned"
},
{
"key": "ctrl+shift+,",
"command": "workbench.action.openWorkspaceSettingsFile"
},
{
"key": "ctrl+,",
"command": "workbench.action.openSettingsJson"
},
{
"key": "ctrl+shift+a",
"command": "workbench.files.action.showActiveFileInExplorer"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment