Created
June 6, 2023 22:47
-
-
Save sshleifer/a238dbaabc1506a3003659735b19fac4 to your computer and use it in GitHub Desktop.
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
// Place your key bindings in this file to override the defaults | |
[ | |
// Switching between editor and terminal | |
{ | |
"key": "ctrl+j", | |
"command": "workbench.action.terminal.focus", | |
"when": "editorFocus || !editorIsOpen" | |
}, | |
{ | |
"key": "ctrl+j", | |
"command": "workbench.action.toggleMaximizedPanel", | |
"when": "terminalFocus && !panelMaximized" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "workbench.action.toggleMaximizedPanel", | |
"when": "terminalFocus && panelMaximized" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "workbench.action.focusActiveEditorGroup", | |
"when": "terminalFocus && !panelMaximized" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "workbench.action.closePanel", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "shift+cmd+c", | |
"command": "-workbench.action.terminal.openNativeConsole", | |
"when": "!terminalFocus" | |
}, | |
// left/right navigation | |
{ | |
"key": "ctrl+l", | |
"command": "workbench.action.focusNextGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+h", | |
"command": "workbench.action.focusPreviousGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+l", | |
"command": "workbench.action.terminal.focusNextPane", | |
"when": "terminalFocus" | |
}, | |
{ | |
"key": "ctrl+h", | |
"command": "workbench.action.terminal.focusPreviousPane", | |
"when": "terminalFocus" | |
}, | |
// Git shortcuts | |
{ | |
"key": "shift+cmd+c", | |
"command": "git.commit" | |
}, | |
// screen/tmux bindings for editor (ctrl+w) | |
{ | |
"key": "ctrl+w c", | |
"command": "workbench.action.splitEditor", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w shift+\\", | |
"command": "workbench.action.splitEditor", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w v", | |
"command": "workbench.action.splitEditor", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w 1", | |
"command": "workbench.action.focusFirstEditorGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w 2", | |
"command": "workbench.action.focusSecondEditorGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w 3", | |
"command": "workbench.action.focusThirdEditorGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w tab", | |
"command": "workbench.action.navigateEditorGroups", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w l", | |
"command": "workbench.action.focusNextGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w h", | |
"command": "workbench.action.focusPreviousGroup", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+w d", | |
"command": "workbench.action.closeActiveEditor", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "cmd+d", | |
"command": "editor.action.revealDefinition", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "f6", | |
"command": "-editor.action.revealDefinition", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "cmd+d", | |
"command": "-editor.action.addSelectionToNextFindMatch", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "cmd+d", | |
"command": "-extension.vim_cmd+d", | |
"when": "editorTextFocus && vim.active && vim.use<D-d> && !inDebugRepl" | |
}, | |
{ | |
"key": "cmd+k", | |
"command": "-workbench.action.terminal.clear", | |
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" | |
}, | |
{ | |
"key": "shift+cmd+enter", | |
"command": "-editor.action.insertLineBefore", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "shift+cmd+enter", | |
"command": "-notebook.cell.insertCodeCellAbove", | |
"when": "notebookCellListFocused && !inputFocus" | |
}, | |
{ | |
"key": "shift+cmd+enter", | |
"command": "-list.toggleSelection", | |
"when": "listFocus && !inputFocus" | |
}, | |
{ | |
"key": "shift+cmd+enter", | |
"command": "-search.action.replaceAllInFile", | |
"when": "fileMatchFocus && replaceActive && searchViewletVisible" | |
}, | |
{ | |
"key": "shift+cmd+enter", | |
"command": "-search.action.replaceAllInFolder", | |
"when": "folderMatchFocus && replaceActive && searchViewletVisible" | |
}, | |
{ | |
"key": "shift+cmd+enter", | |
"command": "workbench.action.toggleZenMode" | |
}, | |
{ | |
"key": "cmd+k z", | |
"command": "-workbench.action.toggleZenMode" | |
}, | |
{ | |
"key": "ctrl+n", | |
"command": "explorer.newFile" | |
}, | |
{ | |
"key": "cmd+1", | |
"command": "-workbench.action.focusFirstEditorGroup" | |
}, | |
{ | |
"key": "cmd+1", | |
"command": "workbench.action.toggleSidebarVisibility" | |
}, | |
{ | |
"key": "cmd+b", | |
"command": "-workbench.action.toggleSidebarVisibility" | |
}, | |
{ | |
"key": "cmd+b", | |
"command": "editor.action.goToReferences", | |
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "shift+f12", | |
"command": "-editor.action.goToReferences", | |
"when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "cmd+e", | |
"command": "-actions.findWithSelection" | |
}, | |
{ | |
"key": "shift+f6", | |
"command": "-workbench.action.focusPreviousPart" | |
}, | |
{ | |
"key": "shift+f6", | |
"command": "editor.action.rename", | |
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "f2", | |
"command": "-editor.action.rename", | |
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment