Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
VS-Code Keymap
// Place your key bindings in this file to override the defaults
// Make sure you disable/replace old keybindings or else Code can misbehave.
// Use "-" in command if you need to disable any keybinding.
// All keybindings must be either scoped or unique.
[
// Setup advanced-new-file - Need to make my own one day
{
"key": "ctrl+n",
"command": "extension.advancedNewFile"
},
{
"key": "ctrl+alt+n",
"command": "workbench.action.files.newUntitledFile"
},
// I hate lru tab switching. Use ctrl+p+p for that.
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
{
"key": "ctrl+pagedown",
"command": "workbench.action.openNextRecentlyUsedEditorInGroup"
},
{
"key": "ctrl+pageup",
"command": "workbench.action.openPreviousRecentlyUsedEditorInGroup"
},
// Sublime text keybindings.
// The extension adds duplicate entries messing up with priority and behaviour.
// It also does not disable original bindings thus creating more confusion.
// Since I only need few of them, I could skip an extension overhead
// and add required keybindings myself.
{
"key": "ctrl+k ctrl+b",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+/",
"command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+/",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+d",
"command": "workbench.view.debug"
},
{
"key": "ctrl+shift+d",
"command": "-workbench.view.debug"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+up",
"command": "-editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+r",
"command": "workbench.action.gotoSymbol"
},
{
"key": "ctrl+shift+o",
"command": "-workbench.action.gotoSymbol"
},
{
"key": "ctrl+shift+r",
"command": "workbench.action.showAllSymbols"
},
{
"key": "ctrl+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "ctrl+shift+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+up",
"command": "-editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+down",
"command": "-editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+/",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+a",
"command": "-editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+j",
"command": "editor.action.joinLines"
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment