Last active
June 1, 2020 10:18
-
-
Save misebox/fe81d50660a5a970a273d017aec4daa5 to your computer and use it in GitHub Desktop.
VSCode minimal KeyBindings for vim extension on linux user.
This file contains 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
[ | |
// Side bar is toggled with [CTRL + SHIFT + B] | |
{ | |
"key": "ctrl+shift+b", | |
"when": "sideBarVisible", | |
"command": "workbench.action.closeSidebar" | |
}, | |
{ | |
"key": "ctrl+shift+b", | |
"when": "!sideBarVisible", | |
"command": "workbench.action.focusSideBar" | |
}, | |
// Files explorer is toggled with [CTRL + SHIFT + E] | |
{ | |
"key": "ctrl+shift+e", | |
"when": "!filesExplorerFocus", | |
"command": "workbench.view.explorer" | |
}, | |
{ | |
"key": "ctrl+shift+e", | |
"when": "filesExplorerFocus", | |
"command": "workbench.action.closeSidebar" | |
}, | |
// Create new file in files explorer with [CTRL + n] | |
{ | |
"key": "ctrl+n", | |
"when": "filesExplorerFocus", | |
"command": "explorer.newFile" | |
}, | |
// Focus next/previous editor with [CTRL + h, l] | |
{ | |
"key": "ctrl+h", | |
"when": "editorTextFocus", | |
"command": "workbench.action.previousEditor" | |
}, | |
{ | |
"key": "ctrl+l", | |
"when": "editorTextFocus", | |
"command": "workbench.action.nextEditor" | |
}, | |
// Move editor in group with [CTRL + SHIFT + h, l] | |
{ | |
"key": "ctrl+shift+h", | |
"when": "editorFocus", | |
"command": "workbench.action.moveEditorLeftInGroup" | |
}, | |
{ | |
"key": "ctrl+shift+l", | |
"when": "editorFocus", | |
"command": "workbench.action.moveEditorRightInGroup" | |
}, | |
// Parameter hints are toggled with [CTRL + SHIFT + SPACE] | |
{ | |
"key": "ctrl+shift+space", | |
"when": "!parameterHintsVisible", | |
"command": "editor.action.triggerParameterHints" | |
}, | |
{ | |
"key": "ctrl+shift+space", | |
"when": "parameterHintsVisible", | |
"command": "closeParameterHints" | |
}, | |
// Suggest widget is toggled with [CTRL + SPACE] | |
{ | |
"key": "ctrl+space", | |
"command": "-toggleSuggestionDetails", | |
"when": "editorTextFocus && suggestWidgetVisible" | |
}, | |
{ | |
"key": "ctrl+space", | |
"when": "!suggestWidgetVisible", | |
"command": "editor.action.triggerSuggest" | |
}, | |
{ | |
"key": "ctrl+space", | |
"when": "suggestWidgetVisible", | |
"command": "hideSuggestWidget" | |
}, | |
// Up and down cursor in multiple suggestions [CTRL + j, k] | |
{ | |
"key": "ctrl+j", | |
"command": "selectNextSuggestion", | |
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "selectPrevSuggestion", | |
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" | |
}, | |
// Escape key always can cancel anything. [ESCAPE] | |
{ | |
"key": "escape", | |
"when": "suggestWidgetVisible", | |
"command": "hideSuggestWidget" | |
}, | |
{ | |
"key": "escape", | |
"when": "parameterHintsVisible", | |
"command": "closeParameterHints" | |
}, | |
// Suppressed vim's [ctrl+k] key binding because it's used by VSCode to Key Combination. | |
{ | |
"key": "ctrl+k", | |
"when": "editorTextFocus && vim.active && vim.use<C-k> && !inDebugRepl", | |
"command": "-extension.vim_ctrl+k", | |
} | |
] |
Author
misebox
commented
May 26, 2020
- VSCode ignores line comments.
- Control sidebar, filesExplorer, parameterHints and suggestions.
- Suppress context-less word based suggestions. Because it's annoying and dangerous for usual programming cases.
- Snippet is also suppressed. It's useful some case but it's annoying in many cases for me.
- Free [CTRL+K] from vim for VSCode key combinations.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment