Skip to content

Instantly share code, notes, and snippets.

@funnierinspanish
Last active December 9, 2022 23:03
Show Gist options
  • Save funnierinspanish/fdec23374a59803ce1986d89ce39d080 to your computer and use it in GitHub Desktop.
Save funnierinspanish/fdec23374a59803ce1986d89ce39d080 to your computer and use it in GitHub Desktop.
VSCode keyboard shortcuts to make MacOS's keyboard a little bit less awful
[
// Redo
{ "key": "ctrl+y", "command": "redo",
"when": "editorFocus" },
// Delete current line
{ "key": "shift+delete", "command": "editor.action.deleteLines",
"when": "editorFocus" },
// Move current line up
{ "key": "ctrl+shift+up", "command": "editor.action.moveLinesUpAction",
"when": "editorFocus" },
// Move current line down
{ "key": "ctrl+shift+down", "command": "editor.action.moveLinesDownAction",
"when": "editorFocus" },
// Create new cursor above
{ "key": "alt+up", "command": "editor.action.insertCursorAbove",
"when": "editorTextFocus" },
// Create new cursor below
{ "key": "alt+down", "command": "editor.action.insertCursorBelow",
"when": "editorTextFocus" },
// Comment toggle
{ "key": "ctrl+[Backslash]", "command": "editor.action.commentLine",
"when": "editorTextFocus" },
// Duplicate current line
{ "key": "ctrl+shift+d", "command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus" },
// Terminal focus from editor
{ "key": "ctrl+t", "command": "workbench.action.terminal.focus",
"when": "!terminalFocus" },
// Editor focus from terminal
{ "key": "ctrl+t", "command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus" },
// Editor focus from terminal (repeated to avoid my usual mistakes)
{ "key": "ctrl+z", "command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus" },
// New terminal
{ "key": "ctrl+n", "command": "workbench.action.terminal.new",
"when": "terminalFocus" },
// Close terminal tab
{ "key": "ctrl+w", "command": "workbench.action.terminal.kill",
"when": "terminalFocus" },
// Tabs
{ "key": "ctrl+tab", "command": "workbench.action.nextEditor",
"when": "!terminalFocus" },
{ "key": "ctrl+shift+tab", "command": "workbench.action.previousEditor",
"when": "!terminalFocus" },
// Tabs - doesn't work yet
{ "key": "ctrl+tab", "command": "workbench.action.terminal.focusNext",
"when": "terminalFocus" },
{ "key": "ctrl+shift+tab", "command": "workbench.action.focusPrevious",
"when": "terminalFocus" }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment