Skip to content

Instantly share code, notes, and snippets.

@sebastianhoitz
Last active March 16, 2023 20:00
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save sebastianhoitz/fbb13e22c2ce16bbb18f3e51151eeca1 to your computer and use it in GitHub Desktop.
Save sebastianhoitz/fbb13e22c2ce16bbb18f3e51151eeca1 to your computer and use it in GitHub Desktop.
VSCode Vim improvements
[
{
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+l",
"command": "workbench.action.focusRightGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+k",
"command": "workbench.action.focusAboveGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "cmd+o",
"command": "workbench.action.showEditorsInActiveGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+j",
"command": "workbench.action.focusBelowGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": ", t",
"command": "workbench.action.toggleSidebarVisibility",
"when": "!editorTextFocus"
},
{
"key": "ctrl+h",
"command": "list.collapse",
"when": "listFocus && !inputFocus"
},
{
"key": "ctrl+l",
"command": "list.expand",
"when": "listFocus && !inputFocus"
},
{
"key": "ctrl+k",
"command": "list.focusUp",
"when": "listFocus && !inputFocus"
},
{
"key": "ctrl+j",
"command": "list.focusDown",
"when": "listFocus && !inputFocus"
},
{
"key": "cmd+enter",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus"
},
{
"key": "enter",
"command": "-renameFile",
"when": "explorerViewletVisible && filesExplorerFocus"
},
{
"key": "enter",
"command": "list.select",
"when": "listFocus && !inputFocus"
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
}
]
{
"vim.hlsearch": true,
"vim.leader": ",",
"vim.insertModeKeyBindings": [{
"before": ["j", "j"],
"after": ["<Esc>"]
}],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<space>"],
"commands": ["workbench.action.files.save"]
},
{
"before": ["<leader>", "<space>"],
"commands": [":nohl"]
},
{
"before": ["<leader>", "w"],
"commands": ["workbench.action.splitEditor"]
},
{
"before": ["<leader>", "t"],
"commands": ["workbench.action.toggleSidebarVisibility"]
},
{
"before": ["<leader>", "c"],
"commands": [
"editor.action.commentLine",
],
},
{
"before": ["<leader>", "f"],
"commands": [
"revealInExplorer",
],
},
{
"before": ["<leader>", "r", "e"],
"commands": [
"editor.action.rename"
]
},
{
"before": ["<leader>", "r", "f"],
"commands": [
"fileutils.renameFile"
]
},
{
"before": ["<leader>", "o", "g"],
"commands": [
"workbench.action.showAllSymbols"
]
},
{
"before": ["<leader>", "o", "o"],
"commands": [
"workbench.action.showEditorsInActiveGroup"
]
},
{
"before": ["<leader>", "o", "p"],
"commands": [
"workbench.action.quickOpen"
]
}
],
"vim.visualModeKeyBindings": [
{
"before": ["<leader>", "c"],
"commands": [
"editor.action.commentLine",
"extension.vim_escape"
],
}
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment