Last active
September 26, 2025 15:17
-
-
Save nitin-dixit/646d94a36472f32e08bbaef000dfaf78 to your computer and use it in GitHub Desktop.
vim extension keybindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Place your key bindings in this file to override the defaults | |
| [ | |
| // Navigation | |
| { | |
| "command": "workbench.action.navigateLeft", | |
| "key": "ctrl-h" | |
| }, | |
| { | |
| "command": "workbench.action.navigateRight", | |
| "key": "ctrl-l" | |
| }, | |
| { | |
| "command": "workbench.action.navigateUp", | |
| "key": "ctrl-k" | |
| }, | |
| { | |
| "command": "workbench.action.navigateDown", | |
| "key": "ctrl-j" | |
| }, | |
| { | |
| "command": "workbench.action.showAllEditors", | |
| "key": "space ,", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)" | |
| }, | |
| { | |
| "args": { | |
| "commands": [ | |
| "workbench.action.toggleSidebarVisibility", | |
| "workbench.files.action.focusFilesExplorer" | |
| ] | |
| }, | |
| "command": "runCommands", | |
| "key": "space e", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus) && !sideBarFocus" | |
| }, | |
| { | |
| "args": { | |
| "commands": [ | |
| "workbench.action.toggleSidebarVisibility", | |
| "workbench.action.focusActiveEditorGroup" | |
| ] | |
| }, | |
| "command": "runCommands", | |
| "key": "space e", | |
| "when": "sideBarFocus && !inputFocus" | |
| }, | |
| { | |
| "command": "workbench.action.toggleSidebarVisibility", | |
| "key": "space e", | |
| "when": "vim.mode == 'Normal' && sideBarVisible" | |
| }, | |
| { | |
| "command": "workbench.action.splitEditor", | |
| "key": "space h", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)" | |
| }, | |
| { | |
| "command": "workbench.action.splitEditorDown", | |
| "key": "space v", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)" | |
| }, | |
| // Coding | |
| { | |
| "command": "editor.action.codeAction", | |
| "key": "space c a", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.action.moveLinesUpAction", | |
| "key": "shift-k", | |
| "when": "vim.mode == 'VisualLine' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.action.moveLinesDownAction", | |
| "key": "shift-j", | |
| "when": "vim.mode == 'VisualLine' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.action.showHover", | |
| "key": "shift-k", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.action.rename", | |
| "key": "space c r", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "workbench.action.gotoSymbol", | |
| "key": "space c s", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "workbench.action.closeActiveEditor", | |
| "key": "space w", | |
| "when": "(vim.mode == 'Normal' && editorTextFocus) || !inputFocus" | |
| }, | |
| { | |
| "command": "workbench.action.closeOtherEditors", | |
| "key": "space shift+w", | |
| "when": "(vim.mode == 'Normal' && editorTextFocus) || !inputFocus" | |
| }, | |
| { | |
| "command": "workbench.action.quickOpen", | |
| "key": "space space", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)" | |
| }, | |
| { | |
| "command": "editor.action.revealDefinition", | |
| "key": "space g d", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.action.goToReferences", | |
| "key": "space g r", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.action.goToImplementation", | |
| "key": "space g i", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "workbench.action.findInFiles", | |
| "key": "space s g", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)" | |
| }, | |
| { | |
| "args": { | |
| "commands": [ | |
| "workbench.view.scm", | |
| "workbench.scm.focus" | |
| ] | |
| }, | |
| "command": "runCommands", | |
| "key": "space g g", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus)" | |
| }, | |
| { | |
| "command": "editor.action.addSelectionToNextFindMatch", | |
| "key": "ctrl-n", | |
| "when": "(vim.mode == 'Normal' || vim.mode == 'Visual') && (editorTextFocus || !inputFocus)" | |
| }, | |
| // File Explorer | |
| { | |
| "command": "renameFile", | |
| "key": "r", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "filesExplorer.copy", | |
| "key": "c", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "filesExplorer.paste", | |
| "key": "p", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "filesExplorer.cut", | |
| "key": "x", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "deleteFile", | |
| "key": "d", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "explorer.newFile", | |
| "key": "a", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "explorer.openToSide", | |
| "key": "s", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "args": { | |
| "commands": [ | |
| "workbench.action.splitEditorDown", | |
| "explorer.openAndPassFocus", | |
| "workbench.action.closeOtherEditors" | |
| ] | |
| }, | |
| "command": "runCommands", | |
| "key": "shift-s", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "command": "explorer.openAndPassFocus", | |
| "key": "enter", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceIsFolder && !inputFocus" | |
| }, | |
| { | |
| "command": "list.toggleExpand", | |
| "key": "enter", | |
| "when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && explorerResourceIsFolder && !inputFocus" | |
| }, | |
| // Debug | |
| { | |
| "command": "workbench.action.debug.selectandstart", | |
| "key": "space d a", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus) && debuggersAvailable" | |
| }, | |
| { | |
| "command": "workbench.action.debug.stop", | |
| "key": "space d t", | |
| "when": "vim.mode == 'Normal' && editorTextFocus && inDebugMode && !focusedSessionIsAttached" | |
| }, | |
| { | |
| "command": "workbench.action.debug.stepOver", | |
| "key": "space d o", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus) && inDebugMode && debugState == 'stopped'" | |
| }, | |
| { | |
| "command": "editor.debug.action.toggleBreakpoint", | |
| "key": "space d b", | |
| "when": "vim.mode == 'Normal' && editorTextFocus" | |
| }, | |
| { | |
| "command": "editor.debug.action.showDebugHover", | |
| "key": "space d e", | |
| "when": "vim.mode == 'Normal' && editorTextFocus && inDebugMode && debugState == 'stopped'" | |
| }, | |
| { | |
| "command": "workbench.action.debug.continue", | |
| "key": "space d c", | |
| "when": "vim.mode == 'Normal' && (editorTextFocus || !inputFocus) && inDebugMode && debugState == 'stopped'" | |
| } | |
| ] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Navigation
ctrl + h : move to left window
ctrl + j : move down window
ctrl + k : move up window
ctrl + l : move to right window
space + , : show all editors
space + e : open sidebar
space s g : find in files
space g g : go to git
tab : next tab in group
shift + tab : previous tab in group
space h : split editor
space v : split editor down
Coding
shift + j : move line down ( editor mode)
shift + k : move line up ( editor mode)
shift + k : show hover
space c a : show code action
space c r : rename variable
space c s : show symbol
space w: close active editor
space shift+w : close other editor
space space : quick open
space g d : go to definition
space g r : go to reference
space g i : go to implementation
space s g : find in files
ctrl + n : add selection next find match (normal mode & visual mode)
File Explorer
r : rename file
c : copy file
p : paste file
x : cut file
d : delete file
a: new file
enter: open file
s : open to side
shift + s : split editor down
a : add new file
shift + a : add new folder
Debug
space d a : select and start
space d t : debug stop
space d o : step over
space d b : toggle breakpoint
space d e : show debug hover
space d c : debug continue