Skip to content

Instantly share code, notes, and snippets.

@cmendez20
Forked from espenbjorkeng/keybindings.json
Last active March 4, 2022 04:27
Show Gist options
  • Save cmendez20/e194bc4d3cc3a42940eb3d1382eff7bb to your computer and use it in GitHub Desktop.
Save cmendez20/e194bc4d3cc3a42940eb3d1382eff7bb to your computer and use it in GitHub Desktop.
// vscode-keybindings for navigation with I/J/K/L and additional functionality with surrounding characters
// Place your key bindings in this file to overwrite the defaults
// ALT + I/J/K/L: up/left/down/right
// ALT + SHIFT + I/J/K/L: mark text up/left/down/right
// CTRL + J/L: send cursor to start/end of line
// CTRL + ALT + J/L: send cursor to start/end of word
// CTRL + ALT + U/O: send cursor to "wordPartLeft"/"wordPartRight"
// CTRL + ALT + SHIFT + U/O: mark from cursor to "wordPartLeft"/"wordPartRight"
// CTRL + ALT + Y: got to declaration
// CTRL + I/K: add/remove another cursor up/down
// Place your key bindings in this file to override the defaults
[
{
"key": "cmd+v",
"command": "pasteAndIndent.action",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+v",
"command": "editor.action.clipboardPasteAction",
"when": "!editorTextFocus"
},
{
"key": "cmd+shift+v",
"command": "editor.action.clipboardPasteAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+ctrl+[ArrowRight]",
"command": "cursorWordEndRight",
"when": "editorTextFocus"
},
{
"key": "alt+ctrl+[ArrowLeft]",
"command": "cursorWordStartLeft",
"when": "editorTextFocus"
},
{
"key": "alt+shift+ctrl+[ArrowLeft]",
"command": "cursorWordLeftSelect",
"when": "editorTextFocus"
},
{
"key": "alt+shift+ctrl+[ArrowRight]",
"command": "cursorWordRightSelect",
"when": "editorTextFocus"
},
{
"key": "alt+shift+[End]",
"command": "cursorEndSelect",
"when": "editorTextFocus"
},
{
"key": "alt+shift+[Home]",
"command": "cursorHomeSelect",
"when": "editorTextFocus"
},
{
"key": "ctrl+;",
"command": "cursorEnd",
"when": "editorTextFocus"
},
{
"key": "ctrl+j",
"command": "cursorHome",
"when": "editorTextFocus"
},
// {
// "key": "ctrl+alt+y",
// "command": "editor.action.goToDeclaration"
// },
{
"key": "alt+shift+ctrl+[End]",
"command": "cursorWordPartRightSelect",
"when": "textInputFocus"
},
{
"key": "alt+shift+ctrl+[Home]",
"command": "cursorWordPartLeftSelect",
"when": "textInputFocus"
},
{
"key": "alt+ctrl+[End]",
"command": "cursorWordPartRight",
"when": "textInputFocus"
},
{
"key": "alt+ctrl+[Home]",
"command": "cursorWordPartLeft",
"when": "textInputFocus"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment