Skip to content

Instantly share code, notes, and snippets.

@richardpark-msft
Last active April 7, 2022 04:24
Show Gist options
  • Save richardpark-msft/f2d8a07ffed284b7a61acb9e174f76e8 to your computer and use it in GitHub Desktop.
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": "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+shift+]",
"command": "editor.action.jumpToBracket",
"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+c",
"command": "-gitlens.views.search.copy",
"when": "gitlens:enabled && focusedView =~ /^gitlens\\.views\\.search/"
},
{
"key": "ctrl+c",
"command": "-gitlens.views.compare.copy",
"when": "gitlens:enabled && focusedView =~ /^gitlens\\.views\\.compare/"
},
{
"key": "ctrl+c",
"command": "-gitlens.views.fileHistory.copy",
"when": "gitlens:enabled && focusedView =~ /^gitlens\\.views\\.fileHistory/"
},
{
"key": "ctrl+c",
"command": "-gitlens.views.lineHistory.copy",
"when": "gitlens:enabled && focusedView =~ /^gitlens\\.views\\.lineHistory/"
},
{
"key": "ctrl+c",
"command": "-gitlens.views.repositories.copy",
"when": "gitlens:enabled && focusedView =~ /^gitlens\\.views\\.repositories/"
},
{
"key": "alt+.",
"command": "-gitlens.diffWithNext",
"when": "editorTextFocus && !isInDiffEditor && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "alt+.",
"command": "-gitlens.diffWithNext",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"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": "-gitlens.diffWithNext",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "alt+.",
"command": "-gitlens.diffWithNextInDiffLeft",
"when": "editorTextFocus && isInDiffLeftEditor && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g .",
"command": "-gitlens.diffWithNextInDiffLeft",
"when": "editorTextFocus && isInDiffLeftEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "alt+,",
"command": "-gitlens.diffWithPrevious",
"when": "editorTextFocus && !isInDiffEditor && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "alt+,",
"command": "-gitlens.diffWithPrevious",
"when": "editorTextFocus && isInDiffLeftEditor && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /tracked/"
},
{
"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": "alt+,",
"command": "-gitlens.diffWithPreviousInDiffRight",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g ,",
"command": "-gitlens.diffWithPreviousInDiffRight",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "shift+alt+.",
"command": "-gitlens.diffWithWorking",
"when": "editorTextFocus && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g shift+.",
"command": "-gitlens.diffWithWorking",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "shift+alt+,",
"command": "-gitlens.diffLineWithPrevious",
"when": "editorTextFocus && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g shift+,",
"command": "-gitlens.diffLineWithPrevious",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "alt+w",
"command": "-gitlens.diffLineWithWorking",
"when": "editorTextFocus && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g w",
"command": "-gitlens.diffLineWithWorking",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "alt+/",
"command": "-gitlens.showCommitSearch",
"when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g /",
"command": "-gitlens.showCommitSearch",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "alt+c",
"command": "-gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g c",
"command": "-gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "shift+alt+h",
"command": "-gitlens.showQuickRepoHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g shift+h",
"command": "-gitlens.showQuickRepoHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "alt+h",
"command": "-gitlens.showQuickFileHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g h",
"command": "-gitlens.showQuickFileHistory",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "alt+-",
"command": "-gitlens.showLastQuickPick",
"when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g -",
"command": "-gitlens.showLastQuickPick",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "alt+s",
"command": "-gitlens.showQuickRepoStatus",
"when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g s",
"command": "-gitlens.showQuickRepoStatus",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "alt+b",
"command": "-gitlens.toggleFileBlame",
"when": "editorTextFocus && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /blameable/"
},
{
"key": "ctrl+shift+g b",
"command": "-gitlens.toggleFileBlame",
"when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /blameable/"
},
{
"key": "shift+alt+b",
"command": "-gitlens.toggleCodeLens",
"when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'alternate'"
},
{
"key": "ctrl+shift+g shift+b",
"command": "-gitlens.toggleCodeLens",
"when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g g",
"command": "-workbench.view.scm",
"when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g /",
"command": "-gitlens.gitCommands",
"when": "!gitlens:disabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g .",
"command": "-gitlens.diffWithNextInDiffLeft",
"when": "editorTextFocus && isInDiffEditor && !isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g .",
"command": "-gitlens.diffWithNextInDiffRight",
"when": "editorTextFocus && isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /revision/ && gitlens:activeFileStatus =~ /revision/"
},
{
"key": "ctrl+shift+g ,",
"command": "-gitlens.diffWithPreviousInDiffLeft",
"when": "editorTextFocus && isInDiffEditor && !isInDiffRightEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
},
{
"key": "ctrl+shift+g shift+h",
"command": "-gitlens.showQuickRepoHistory",
"when": "!gitlens:disabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g h",
"command": "-gitlens.showQuickFileHistory",
"when": "!gitlens:disabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g c",
"command": "-gitlens.showQuickCommitFileDetails",
"when": "editorTextFocus && !gitlens:disabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g s",
"command": "-gitlens.showQuickRepoStatus",
"when": "!gitlens:disabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g shift+b",
"command": "-gitlens.toggleCodeLens",
"when": "editorTextFocus && !gitlens:disabled && !gitlens:disabledToggleCodeLens && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+shift+g g",
"command": "-workbench.view.scm",
"when": "!gitlens:disabled && config.gitlens.keymap == 'chorded'"
},
{
"key": "ctrl+n",
"command": "-extension.vim_ctrl+n",
"when": "editorTextFocus && vim.active && vim.use<C-n> && !inDebugRepl || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
},
{
"key": "ctrl+shift+\\",
"command": "-workbench.action.terminal.focusTabs",
"when": "terminalFocus && terminalProcessSupported || terminalProcessSupported && terminalTabsFocus"
},
{
"key": "ctrl+alt+win+\\",
"command": "go.test.file"
},
// {
// "key": "ctrl+\\",
// "command": "testing.runAtCursor"
// },
// {
// "key": "ctrl+shift+\\",
// "command": "testing.debugAtCursor"
// },
// {
// "key": "ctrl+shift+alt+\\",
// "command": "testing.reRunLastRun"
// },
{
"key": "ctrl+\\",
"command": "go.test.cursorOrPrevious"
},
{
"key": "ctrl+shift+\\",
"command": "go.debug.cursor"
},
{
"key": "ctrl+shift+alt+\\",
"command": "testing.reRunLastRun"
},
{
"key": "ctrl+shift+g g",
"command": "-workbench.view.scm",
"when": "workbench.scm.active && !gitlens:disabled && config.gitlens.keymap == 'chorded'"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment