Skip to content

Instantly share code, notes, and snippets.

@bennettdams
Created October 5, 2018 11:59
Show Gist options
  • Save bennettdams/76c06c0bfbac62f4b1acd9a80af05a8a to your computer and use it in GitHub Desktop.
Save bennettdams/76c06c0bfbac62f4b1acd9a80af05a8a to your computer and use it in GitHub Desktop.
VS Code keybindings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+f",
"command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+f",
"command": "-editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+d",
"command": "editor.action.deleteLines",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "ctrl+shift+k",
"command": "-editor.action.deleteLines",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "ctrl+alt+down",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+alt+up",
"command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+up",
"command": "-editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
// camel case & underscore jump
{
"key": "ctrl+right",
"command": "cursorWordPartRight",
"when": "textInputFocus"
},
{
"key": "ctrl+shift+right",
"command": "cursorWordPartRightSelect",
"when": "textInputFocus"
},
{
"key": "ctrl+left",
"command": "cursorWordPartStartLeft",
"when": "textInputFocus"
},
{
"key": "ctrl+shift+left",
"command": "cursorWordPartStartLeftSelect",
"when": "textInputFocus"
},
{
"key": "ctrl+backspace",
"command": "deleteWordPartLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "ctrl+r",
"command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+oem_2",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment