Skip to content

Instantly share code, notes, and snippets.

@sfengyuan
Last active January 28, 2019 12:23
Show Gist options
  • Save sfengyuan/a80c0432a88516cc97915112313e4cba to your computer and use it in GitHub Desktop.
Save sfengyuan/a80c0432a88516cc97915112313e4cba to your computer and use it in GitHub Desktop.
vs code key bindings
// Place your key bindings in this file to overwrite the defaults
[
// -------- edit
{
"key": "ctrl+shift+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
// -------- navigate: cursor
{
"key": "ctrl+g",
"command": "extension.jumpy-word", // ext: jumpy
"when": "editorTextFocus"
},
{
"key": "alt+right",
"command": "cursorLineEnd"
},
{
"key": "alt+left",
"command": "cursorLineStart"
},
// -------- navigate: group
{
"key": "shift+tab",
"command": "workbench.action.navigateEditorGroups"
},
{
"key": "ctrl+k l",
"command": "workbench.action.focusLastEditorGroup"
},
// ctrl+${num}: focus #num group
// -------- panel
{
"key": "alt+p",
"command": "bookmarks.list", // ext: bookmarks
"when": "editorTextFocus"
},
// ctrl+p: file list
// ctrl+shift+p: command
// ctrl+r: recent projects
// ctrl+alt+n: new file < ext: advanced new file
// -------- select
{
"key": "ctrl+shift+9",
"command": "editor.action.selectToBracket"
},
{
"key": "ctrl+j",
"command": "editor.action.smartSelect.grow",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+j",
"command": "editor.action.smartSelect.shrink",
"when": "editorTextFocus"
},
{
"key": "ctrl+l",
"command": "expandLineSelection",
"when": "textInputFocus"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment