Last active
July 4, 2025 02:25
-
-
Save spartanatreyu/0effd998f6c373307cf84eed37aa2026 to your computer and use it in GitHub Desktop.
Personal vscode keybindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// Window / UI fixes | |
// Overwrite default tab switching shortcuts (they should work like browser tabs do): | |
{ | |
"key": "ctrl+tab", | |
"command": "-workbench.action.openNextRecentlyUsedEditorInGroup" | |
}, | |
{ | |
"key": "ctrl+shift+tab", | |
"command": "-workbench.action.openPreviousRecentlyUsedEditorInGroup" | |
}, | |
{ | |
"key": "ctrl+tab", | |
"command": "-workbench.action.quickOpenNavigateNextInEditorPicker", | |
"when": "inEditorsPicker && inQuickOpen" | |
}, | |
{ | |
"key": "ctrl+shift+tab", | |
"command": "-workbench.action.quickOpenNavigatePreviousInEditorPicker", | |
"when": "inEditorsPicker && inQuickOpen" | |
}, | |
{ | |
"key": "ctrl+tab", | |
"command": "workbench.action.nextEditor" | |
}, | |
{ | |
"key": "alt+cmd+right", | |
"command": "-workbench.action.nextEditor" | |
}, | |
{ | |
"key": "ctrl+shift+tab", | |
"command": "workbench.action.previousEditor" | |
}, | |
{ | |
"key": "alt+cmd+left", | |
"command": "-workbench.action.previousEditor" | |
}, | |
// Close window if trying to close a tab and there are not tabs left to close | |
{ | |
"key": "cmd+w", | |
"command": "workbench.action.closeWindow", | |
"when": "!editorIsOpen && !multipleEditorGroups" | |
}, | |
// Code Navigation | |
// Jump to matching bracket | |
{ | |
"key": "alt+/", | |
"command": "editor.action.jumpToBracket", | |
"when": "editorTextFocus" | |
}, | |
// Select to matching bracket | |
{ | |
"key": "shift+alt+/", | |
"command": "editor.action.selectToBracket" | |
}, | |
// Move smart select expansion to Cmd + Shift 9/0 in case it's needed | |
{ | |
"key": "shift+cmd+0", | |
"command": "editor.action.smartSelect.expand", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "shift+cmd+9", | |
"command": "editor.action.smartSelect.shrink", | |
"when": "editorTextFocus" | |
}, | |
// Code Changes | |
// Toggle comment (prefer Emmet's version when editing html/css since it covers more corner cases than vscode's stock behaviour) | |
{ | |
"key": "cmd+/", | |
"command": "editor.emmet.action.toggleComment", | |
"when": "editorTextFocus && !editorReadonly && (resourceLangId == 'html' || resourceLangId == 'css')" | |
}, | |
// Emmet: Wrap selection with html tag | |
{ | |
"key": "ctrl+shift+'", | |
"command": "editor.emmet.action.wrapWithAbbreviation" | |
}, | |
// Emmet: Go to opening/closing tag | |
{ | |
"key": "cmd+'", | |
"command": "editor.emmet.action.matchTag" | |
}, | |
// VS Code behaviour bugfixes | |
// Stops pasting on Windows being overriden | |
{ | |
"key": "ctrl+p", | |
"command": "-selectPrevCodeAction", | |
"when": "codeActionMenuVisible" | |
}, | |
{ | |
"key": "ctrl+p", | |
"command": "-selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion" | |
}, | |
// Stop word selection on Windows being overriden | |
{ | |
"key": "ctrl+shift+right", | |
"command": "-editor.action.smartSelect.expand", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "ctrl+shift+left", | |
"command": "-editor.action.smartSelect.shrink", | |
"when": "editorTextFocus" | |
}, | |
// Not sure, don't remember | |
{ | |
"key": "cmd+d", | |
"command": "editor.action.addSelectionToNextFindMatch", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "cmd+d", | |
"command": "-editor.action.addSelectionToNextFindMatch", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "shift+cmd+\\", | |
"command": "-editor.action.jumpToBracket", | |
"when": "editorTextFocus" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment