Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
VS Code Emacs-Like Keyboard Shortcuts
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+k ctrl+s",
"command": "saveAll",
"when": "editorTextFocus"
},
{
"key": "ctrl+p",
"command": "cursorUp"
},
{
"key": "ctrl+n",
"command": "cursorDown"
},
{
"key": "ctrl+f",
"command": "cursorRight",
"when": "editorTextFocus"
},
{
"key": "ctrl+b",
"command": "cursorLeft",
"when": "editorTextFocus"
},
{
"key": "alt+f",
"command": "cursorWordRight",
"when": "editorTextFocus"
},
{
"key": "alt+b",
"command": "cursorWordLeft",
"when": "editorTextFocus"
},
{
"key": "alt+backspace",
"command": "deleteWordLeft",
"when": "editorTextFocus"
},
{
"key": "ctrl+a",
"command": "cursorHome",
"when": "editorTextFocus"
},
{
"key": "ctrl+e",
"command": "cursorEnd",
"when": "editorTextFocus"
},
{
"key": "ctrl+d",
"command": "deleteRight",
"when": "editorTextFocus"
},
{
"key": "alt+d",
"command": "deleteWordRight",
"when": "editorTextFocus"
},
{
"key": "ctrl+i",
"command": "actions.find"
},
{
"key": "ctrl+shift+t",
"command": "workbench.action.tasks.runTask",
"when": "editorTextFocus"
},
{
"key": "ctrl+,",
"command": "workbench.action.quickOpen"
},
{
"key": "ctrl+alt+a",
"command": "editor.action.selectAll",
"when": "editorTextFocus"
},
// Navigation in code
{
"key": "ctrl+alt+p",
"command": "cursorPageUp",
"when": "editorTextFocus"
},
// note: work around mac issue with alt+n
{
"key": "ctrl+alt+n",
"command": "cursorPageDown",
"when": "editorTextFocus"
},
// Navigation in dialogs
{
"key": "ctrl+p",
"command": "showPrevParameterHint",
"when": "editorTextFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
},
{
"key": "ctrl+p",
"command": "selectPrevSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{
"key": "ctrl+n",
"command": "showNextParameterHint",
"when": "editorTextFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
},
{
"key": "ctrl+n",
"command": "selectNextSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
// Selection
{
"key": "ctrl+shift+n",
"command": "cursorDownSelect"
},
{
"key": "ctrl+shift+p",
"command": "cursorUpSelect"
},
{
"key": "ctrl+shift+f",
"command": "cursorRightSelect"
},
{
"key": "ctrl+shift+b",
"command": "cursorLeftSelect"
},
{
"key": "ctrl+shift+e",
"command": "cursorEndSelect"
},
{
"key": "ctrl+shift+a",
"command": "cursorHomeSelect"
},
{
"key": "shift+alt+f",
"command": "cursorWordRightSelect"
},
{
"key": "shift+alt+b",
"command": "cursorWordLeftSelect"
},
// Search
{
"key": "ctrl+alt+f",
"command": "workbench.action.findInFiles"
},
{
"key": "ctrl+k",
"command": "-deleteAllRight",
"when": "textInputFocus && !editorReadonly"
},
// Mouse navigation
{
"key": "cmd+]",
"command": "workbench.action.navigateForward",
"when": "editorTextFocus"
},
{
"key": "cmd+[",
"command": "workbench.action.navigateBack",
"when": "editorTextFocus"
},
// go
{
"key": "shift+cmd+t",
"command": "go.toggle.test.file",
"when": "editorLangId == 'go'"
},
// Terminal
{
"key": "cmd+ctrl+t",
"command": "workbench.panel.terminal.focus"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment