Skip to content

Instantly share code, notes, and snippets.

@jperocho
Last active April 15, 2022 21:29
Show Gist options
  • Save jperocho/b9dc9413c55b55bdda63867e5043e171 to your computer and use it in GitHub Desktop.
Save jperocho/b9dc9413c55b55bdda63867e5043e171 to your computer and use it in GitHub Desktop.
Key Bindings for VS Code: Using CTL + ALT + [ h, j, k, l ] to navigate like vim
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+alt+k",
"command": "cursorUp",
"when": "textInputFocus"
},
{
"key": "up",
"command": "cursorUp",
"when": "textInputFocus"
},
{
"key": "ctrl+alt+j",
"command": "cursorDown",
"when": "textInputFocus"
},
{
"key": "down",
"command": "cursorDown",
"when": "textInputFocus"
},
{
"key": "ctrl+alt+h",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "left",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "ctrl+alt+l",
"command": "cursorRight",
"when": "textInputFocus"
},
{
"key": "right",
"command": "cursorRight",
"when": "textInputFocus"
},
{
"key": "ctrl+shift+alt+j",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+k",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+h",
"command": "cursorWordLeft",
"when": "textInputFocus && !accessibilityModeEnabled"
},
{
"key": "ctrl+left",
"command": "cursorWordLeft",
"when": "textInputFocus && !accessibilityModeEnabled"
},
{
"key": "ctrl+shift+alt+l",
"command": "cursorWordRight",
"when": "textInputFocus && !accessibilityModeEnabled"
},
{
"key": "ctrl+right",
"command": "cursorWordRight",
"when": "textInputFocus && !accessibilityModeEnabled"
},
{
"key": "ctrl+alt+e",
"command": "cursorEnd",
"when": "textInputFocus"
},
{
"key": "end",
"command": "cursorEnd",
"when": "textInputFocus"
},
{
"key": "ctrl+alt+a",
"command": "cursorHome",
"when": "textInputFocus"
},
{
"key": "home",
"command": "cursorHome",
"when": "textInputFocus"
},
{
"key": "ctrl+alt+win+j",
"command": "editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+down",
"command": "editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+win+k",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+up",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment