Skip to content

Instantly share code, notes, and snippets.

@dragod812
Last active February 28, 2024 21:05
Show Gist options
  • Save dragod812/66056db350261024b04543605c47f3fb to your computer and use it in GitHub Desktop.
Save dragod812/66056db350261024b04543605c47f3fb to your computer and use it in GitHub Desktop.
VSCode VIM Keybindings
"vim.leader": " ",
"vim.insertModeKeyBindings": [
{
"before": [
"ctrl+a"
],
"commands": [
"editor.action.quickFix"
]
},
{
"before": [
"ctrl+y"
],
"commands": [
"acceptSelectedSuggestion"
]
}
],
"workbench.editor.revealIfOpen": true,
"vim.normalModeKeyBindings": [
{
"before": [
"ctrl+j"
],
"commands": [
"vscode-harpoon.gotoEditor1"
]
},
{
"before": [
"ctrl+k"
],
"commands": [
"vscode-harpoon.gotoEditor2"
]
},
{
"before": [
"ctrl+l"
],
"commands": [
"vscode-harpoon.gotoEditor3"
]
},
{
"before": [
"ctrl+m"
],
"commands": [
"vscode-harpoon.gotoEditor4"
]
},
{
"before": [
"<leader>",
"\\"
],
"commands": [
"workbench.action.pinEditor"
]
},
{
"before": [
"<leader>",
"|"
],
"commands": [
"workbench.action.unpinEditor"
]
},
{
"before": [
"<leader>",
"`"
],
"commands": [
"terminal.focus"
]
},
{
"before": [
"g",
","
],
"commands": [
"workbench.action.openSettingsJson"
]
},
{
"before": [
"<leader>",
"g",
"s"
],
"commands": [
"workbench.scm.focus"
]
},
{
"before": [
"<leader>",
"1"
],
"commands": [
"workbench.action.openEditorAtIndex1"
]
},
{
"before": [
"<leader>",
"2"
],
"commands": [
"workbench.action.openEditorAtIndex2"
]
},
{
"before": [
"<leader>",
"3"
],
"commands": [
"workbench.action.openEditorAtIndex3"
]
},
{
"before": [
"<leader>",
"4"
],
"commands": [
"workbench.action.openEditorAtIndex4"
]
},
{
"before": [
"<leader>",
"5"
],
"commands": [
"workbench.action.openEditorAtIndex5"
]
},
{
"before": [
"<leader>",
"6"
],
"commands": [
"workbench.action.openEditorAtIndex6"
]
},
{
"before": [
"<leader>",
"7"
],
"commands": [
"workbench.action.openEditorAtIndex7"
]
},
{
"before": [
"<leader>",
"8"
],
"commands": [
"workbench.action.openEditorAtIndex8"
]
},
{
"before": [
"<leader>",
"9"
],
"commands": [
"workbench.action.openEditorAtIndex9"
]
},
{
"before": [
"<leader>",
"0"
],
"commands": [
"workbench.action.lastEditorInGroup"
]
},
{
"before": [
"<leader>",
"p",
"f"
],
"commands": [
"workbench.action.quickOpen"
]
},
{
"before": [
"<leader>",
"space"
],
"commands": [
"workbench.action.openNextRecentlyUsedEditor"
]
},
{
"before": [
"<leader>",
"enter"
],
"commands": [
"workbench.action.quickOpen"
]
},
{
"before": [
"<leader>",
"a"
],
"commands": [
"vscode-harpoon.addEditor"
]
},
{
"before": [
"<leader>",
"g",
"a"
],
"commands": [
"pr:github.focus"
]
},
{
"before": [
"<leader>",
"b"
],
"commands": [
"bookmarks.toggleLabeled"
]
},
{
"before": [
"<leader>",
"c"
],
"commands": [
"copyRelativeFilePath"
]
},
{
"before": [
"<leader>",
"C"
],
"commands": [
"copyFilePath"
]
},
{
"before": [
"<leader>",
"g",
"l"
],
"commands": [
"gitlens.views.commits.focus"
]
},
{
"before": [
"<leader>",
"v",
"l"
],
"commands": [
"go.languageserver.restart",
"python.analysis.restartLanguageServer"
]
},
{
"before": [
"<leader>",
"g",
"d"
],
"commands": [
"git.openChange"
]
},
{
"before": [
"<leader>",
"g",
"D"
],
"commands": [
"git.openFile"
]
},
{
"before": [
"<leader>",
"D"
],
"commands": [
"workbench.action.debug.start"
]
},
{
"before": [
"<leader>",
"d",
"o"
],
"commands": [
"workbench.action.gotoSymbol"
]
},
{
"before": [
"<leader>",
"e"
],
"commands": [
"vscode-harpoon.editEditors"
]
},
{
"before": [
"<leader>",
"g",
"c"
],
"commands": [
"git.checkout"
]
},
{
"before": [
"<leader>",
"g",
"f"
],
"commands": [
"gitlens.views.fileHistory.focus"
]
},
{
"before": [
"<leader>",
"f"
],
"commands": [
"editor.action.formatDocument"
]
},
{
"before": [
"z",
"a"
],
"commands": [
"editor.toggleFold"
]
},
{
"before": [
"z",
"c"
],
"commands": [
"editor.foldRecursively"
]
},
{
"before": [
"z",
"M"
],
"commands": [
"editor.foldAll"
]
},
{
"before": [
"z",
"o"
],
"commands": [
"editor.unfoldRecursively"
]
},
{
"before": [
"z",
"R"
],
"commands": [
"editor.unfoldAll"
]
},
{
"before": [
"<leader>",
"m"
],
"commands": [
"workbench.action.toggleMaximizeEditorGroup",
"workbench.action.closeSidebar",
"workbench.action.closeAuxiliaryBar"
]
},
{
"before": [
"<leader>",
"M"
],
"commands": [
"workbench.action.evenEditorWidths",
]
},
{
"before": [
"K"
],
"commands": [
"editor.action.showHover"
]
},
{
"before": [
"]",
"d"
],
"commands": [
"editor.action.marker.next"
]
},
{
"before": [
"[",
"d"
],
"commands": [
"editor.action.marker.prev"
]
},
{
"before": [
"]",
"c"
],
"commands": [
"workbench.action.editor.nextChange",
"workbench.action.compareEditor.nextChange"
]
},
{
"before": [
"[",
"c"
],
"commands": [
"workbench.action.editor.previousChange",
"workbench.action.compareEditor.previousChange"
]
},
{
"before": [
"g",
"i"
],
"commands": [
"references-view.findImplementations"
]
},
{
"before": [
"leader",
"j"
],
"commands": [
"workbench.action.quickOpenNavigateNext"
]
},
{
"before": [
"leader",
"k"
],
"commands": [
"workbench.action.quickOpenNavigatePrevious"
]
},
{
"before": [
"<leader>",
"d",
"o"
],
"commands": [
"breadcrumbs.focusAndSelect"
]
},
{
"before": [
"<leader>",
"n"
],
"commands": [
"workbench.action.files.newUntitledFile"
]
},
{
"before": [
"g",
"n"
],
"commands": [
"workbench.action.editor.nextChange",
"workbench.action.compareEditor.nextChange"
]
},
{
"before": [
"<leader>",
"g",
"p"
],
"commands": [
"git.pull"
]
},
{
"before": [
"<leader>",
"g",
"P"
],
"commands": [
"git.pushTo"
]
},
{
"before": [
"c",
"z",
"z"
],
"commands": [
"git.stash"
]
},
{
"before": [
"c",
"z",
"a"
],
"commands": [
"git.stashApply"
]
},
{
"before": [
"<leader>",
"p",
"o"
],
"commands": [
"workbench.action.showAllSymbols"
]
},
{
"before": [
"<leader>",
"o"
],
"commands": [
"outline.focus"
]
},
{
"before": [
"g",
"p"
],
"commands": [
"workbench.action.editor.previousChange",
"workbench.action.compareEditor.previousChange"
]
},
{
"before": [
"<leader>",
"g",
"r"
],
"commands": [
"gitlens.gitCommands.rebase"
]
},
{
"before": [
"<leader>",
"p",
"s"
],
"commands": [
"search.action.openEditor"
]
},
{
"before": [
"g",
"s"
],
"commands": [
"workbench.action.focusSideBar"
]
},
{
"before": [
"g",
"S"
],
"commands": [
"workbench.action.focusAuxiliaryBar"
]
},
{
"before": [
"s"
],
"after": [
"<leader>",
"<leader>",
"s"
]
},
{
"before": [
"<leader>",
"x"
],
"commands": [
"workbench.action.toggleSidebarVisibility"
]
},
{
"before": [
"<leader>",
"X"
],
"commands": [
"workbench.action.toggleAuxiliaryBar"
]
},
{
"before": [
"g",
"t"
],
"commands": [
"extension.goToTest"
]
},
{
"before": [
"<leader>",
"t",
"c"
],
"commands": [
"workbench.action.debug.continue"
]
},
{
"before": [
"<leader>",
"t",
"d"
],
"commands": [
"testing.debugAtCursor"
]
},
{
"before": [
"<leader>",
"t",
"r"
],
"commands": [
"testing.runAtCursor"
]
},
{
"before": [
"<leader>",
"t",
"s",
"o"
],
"commands": [
"workbench.action.debug.stepOver"
]
},
{
"before": [
"<leader>",
"t",
"v"
],
"commands": [
"workbench.debug.action.focusVariablesView"
]
},
{
"before": [
"<leader>",
"t",
"x"
],
"commands": [
"workbench.action.debug.stop"
]
},
{
"before": [
"g",
"D"
],
"commands": [
"editor.action.goToTypeDefinition"
]
},
{
"before": [
"<leader>",
"v",
"a"
],
"commands": [
"editor.action.quickFix"
]
},
{
"before": [
"<leader>",
"v",
"r"
],
"commands": [
"editor.action.rename"
]
},
{
"before": [
"<leader>",
"v",
"t"
],
"commands": [
"go.test.generate.function"
]
},
{
"before": [
"<leader>",
"t"
],
"commands": [
"testing.runAtCursor"
]
},
{
"before": [
"<leader>",
"w"
],
"commands": [
"workbench.action.switchWindow"
]
},
{
"before": [
"<leader>",
"p",
"p"
],
"commands": [
"workbench.action.openRecent"
]
},
{
"before": [
"<leader>",
"p",
"x"
],
"commands": [
"workbench.action.closeAllEditors"
]
},
{
"before": [
"g",
"x"
],
"commands": [
"workbench.files.action.focusFilesExplorer"
]
},
{
"before": [
"<leader>",
"z"
],
"commands": [
"workbench.action.toggleZenMode"
]
},
{
"before": [
"g",
"H"
],
"commands": [
"workbench.action.moveEditorToLeftGroup"
]
},
{
"before": [
"g",
"J"
],
"commands": [
"workbench.action.moveEditorToBelowGroup"
]
},
{
"before": [
"g",
"K"
],
"commands": [
"workbench.action.moveEditorToAboveGroup"
]
},
{
"before": [
"g",
"L"
],
"commands": [
"workbench.action.moveEditorToRightGroup"
]
},
{
"before": [
"g",
"h"
],
"commands": [
"workbench.action.focusLeftGroup"
]
},
{
"before": [
"g",
"j"
],
"commands": [
"workbench.action.focusBelowGroup"
]
},
{
"before": [
"g",
"k"
],
"commands": [
"workbench.action.focusAboveGroup"
]
},
{
"before": [
"g",
"l"
],
"commands": [
"workbench.action.focusRightGroup"
]
}
],
"vim.visualModeKeyBindings": [
{
"before": [
"<leader>",
"d"
],
"commands": [
"extension.partialDiff.markSection1"
]
},
{
"before": [
"<leader>",
"D"
],
"commands": [
"extension.partialDiff.markSection2AndTakeDiff"
]
},
{
"before": [
"<leader>",
"+"
],
"commands": [
"git.stageSelectedRanges"
]
},
{
"before": [
"<leader>",
"-"
],
"commands": [
"git.unstageSelectedRanges"
]
},
{
"before": [
"<leader>",
"c"
],
"commands": [
"workbench.action.addComment"
]
},
{
"before": [
"J"
],
"commands": [
"editor.action.moveLinesDownAction"
]
},
{
"before": [
"K"
],
"commands": [
"editor.action.moveLinesUpAction"
]
},
{
"before": [
"<leader>",
"g",
"r"
],
"commands": [
"git.revertSelectedRanges"
]
},
{
"before": [
"s"
],
"after": [
"<leader>",
"<leader>",
"s"
]
}
],
"vim.easymotion": true,
"vim.smartRelativeLine": true,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment