Created
October 8, 2019 10:09
-
-
Save eliasnorrby/9eebf4613e905c1f1eecddfa943bc1ed to your computer and use it in GitHub Desktop.
vim keybindings for vscode
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
| { | |
| // VIM | |
| "vim.leader": " ", | |
| "vim.easymotion": false, | |
| "vim.sneak": true, | |
| "vim.camelCaseMotion.enable": false, | |
| "vim.incsearch": true, | |
| "vim.useSystemClipboard": true, | |
| "vim.useCtrlKeys": true, | |
| "vim.hlsearch": false, | |
| // "vim.normalModeKeyBindings": [], | |
| "vim.normalModeKeyBindingsNonRecursive": [ | |
| // Shifting focus | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "h" | |
| ], | |
| "commands": [ | |
| "workbench.action.focusLeftGroup" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "l" | |
| ], | |
| "commands": [ | |
| "workbench.action.focusRightGroup" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "k" | |
| ], | |
| "commands": [ | |
| "workbench.action.focusAboveGroup" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "j" | |
| ], | |
| "commands": [ | |
| "workbench.action.focusBelowGroup" | |
| ] | |
| }, | |
| // Moving windows | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "L" | |
| ], | |
| "commands": [ | |
| "workbench.action.moveEditorToRightGroup" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "H" | |
| ], | |
| "commands": [ | |
| "workbench.action.moveEditorToLeftGroup" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "K" | |
| ], | |
| "commands": [ | |
| "workbench.action.moveEditorToAboveGroup" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "J" | |
| ], | |
| "commands": [ | |
| "workbench.action.moveEditorToBelowGroup" | |
| ] | |
| }, | |
| // Commands | |
| { | |
| "before": [ | |
| "<leader>", | |
| ":" | |
| ], | |
| "commands": [ | |
| "workbench.action.showCommands" | |
| ] | |
| }, | |
| // File operations | |
| { | |
| "before": [ | |
| "<leader>", | |
| "f", | |
| "s" | |
| ], | |
| "commands": [ | |
| ":w" | |
| ] | |
| }, | |
| // Buffer operations | |
| { | |
| "before": [ | |
| "<leader>", | |
| "b", | |
| "k" | |
| ], | |
| "commands": [ | |
| ":q!" | |
| ] | |
| }, | |
| // { | |
| // "before": ["<leader>", "b", "o"], | |
| // "commands": ["workbench.action.closeEditorsInOtherGroups"] | |
| // }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "b", | |
| "]" | |
| ], | |
| "commands": [ | |
| "workbench.action.nextEditor" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "b", | |
| "[" | |
| ], | |
| "commands": [ | |
| "workbench.action.previousEditor" | |
| ] | |
| }, | |
| // Opening stuff | |
| { | |
| "before": [ | |
| "<leader>", | |
| "o" | |
| ], | |
| "commands": [ | |
| "workbench.action.quickOpen" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "<leader>" | |
| ], | |
| "commands": [ | |
| "workbench.action.showAllEditors" | |
| ] | |
| // "commands": ["workbench.action.quickOpen"] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "." | |
| ], | |
| "commands": [ | |
| "workbench.action.showAllSymbols" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "b", | |
| "b" | |
| ], | |
| // "commands": ["workbench.action.quickOpen"] | |
| "commands": [ | |
| "workbench.action.showAllEditors" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "b", | |
| "o" | |
| ], | |
| // "commands": ["workbench.action.closeOtherEditors"] | |
| "commands": [ | |
| "workbench.action.joinAllGroups" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "b", | |
| "N" | |
| ], | |
| "commands": [ | |
| "workbench.action.files.newUntitledFile" | |
| ] | |
| }, | |
| // Layouts | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "v" | |
| ], | |
| // "commands": ["workbench.action.editorLayoutTwoColumns"] | |
| // "commands": ["workbench.action.newGroupRight"] | |
| "commands": [ | |
| "workbench.action.splitEditorRight" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "s" | |
| ], | |
| // "commands": ["workbench.action.editorLayoutTwoRows"] | |
| // "commands": ["workbench.action.newGroupBelow"] | |
| "commands": [ | |
| "workbench.action.splitEditorDown" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "c" | |
| ], | |
| "commands": [ | |
| "workbench.action.closeGroup" | |
| ] | |
| // "commands": ["workbench.action.closeEditorsInGroup"] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "o" | |
| ], | |
| "commands": [ | |
| "workbench.action.joinAllGroups" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "=" | |
| ], | |
| "commands": [ | |
| "workbench.action.evenEditorWidths" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "z" | |
| ], | |
| "commands": [ | |
| "workbench.action.joinAllGroups" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "w", | |
| "}" | |
| ], | |
| "commands": [ | |
| "workbench.action.toggleEditorGroupLayout" | |
| ] | |
| }, | |
| // Toggles | |
| { | |
| "before": [ | |
| "<leader>", | |
| "t", | |
| "a" | |
| ], | |
| "commands": [ | |
| "workbench.action.toggleActivityBarVisibility" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "t", | |
| "l" | |
| ], | |
| "commands": [ | |
| ":set invrelativenumber" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "t", | |
| "L" | |
| ], | |
| "commands": [ | |
| ":set invnumber" | |
| ] | |
| }, | |
| // Legacy | |
| { | |
| "before": [ | |
| "<leader>", | |
| "," | |
| ], | |
| "commands": [ | |
| ":nohl" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "u" | |
| ], | |
| "commands": [ | |
| "workbench.action.increaseViewSize" | |
| ] | |
| }, | |
| { | |
| "before": [ | |
| "<leader>", | |
| "U" | |
| ], | |
| "commands": [ | |
| "workbench.action.decreaseViewSize" | |
| ] | |
| } | |
| ], | |
| "vim.handleKeys": { | |
| "<C-h>": false, | |
| "<C-j>": false, | |
| "<C-k>": false, | |
| "<C-l>": false | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment