Files
dotfiles/.config/Code/User/keybindings.json
2024-12-17 14:53:57 +01:00

293 lines
9.3 KiB
JSON

// Place your key bindings in this file to override the defaultsauto[]
[
// -------------- 1. EDITOR PANE MANAGEMENT --------------
// -------------- 1.1 EDITOR PANE CREATION ---------------
{
"key": "ctrl+a shift+7",
"command": "workbench.action.splitEditorRight"
},
{
"key": "ctrl+a -",
"command": "workbench.action.splitEditorDown"
},
// -------------- 1.2 EDITOR PANE SWITCHING --------------
{
"key": "ctrl+a left",
"command": "workbench.action.focusLeftGroup"
},
{
"key": "ctrl+a right",
"command": "workbench.action.focusRightGroup"
},
{
"key": "ctrl+a up",
"command": "workbench.action.focusAboveGroup"
},
{
"key": "ctrl+a down",
"command": "workbench.action.focusBelowGroup"
},
// --------------- 1.3 EDITOR PANE MOVEMENT --------------
{
"key": "ctrl+a shift+left",
"command": "workbench.action.moveActiveEditorGroupLeft"
},
{
"key": "ctrl+a shift+right",
"command": "workbench.action.moveActiveEditorGroupRight"
},
{
"key": "ctrl+a shift+up",
"command": "workbench.action.moveActiveEditorGroupUp"
},
{
"key": "ctrl+a shift+down",
"command": "workbench.action.moveActiveEditorGroupDown"
},
// ------------------ 2. FILE MANAGEMENT -----------------
{
"key": "ctrl+a f",
"command": "workbench.files.action.focusFilesExplorer"
},
{
"key": "ctrl+n",
"command": "explorer.newFile",
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+d",
"command": "explorer.newFolder",
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
// ----------------- 3. SYMBOL MANAGEMENT ----------------
{
"key": "shift+ctrl+r",
"command": "editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
},
{
"key": "shift+ctrl+d",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
// ------------- 4. VARIOUS EDITOR SHORTCUTS -------------
{
"key": "ctrl+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+t",
"command": "workbench.action.createTerminalEditor"
},
{
"key": "ctrl+u",
"command": "workbench.action.showAllSymbols"
},
{
"key": "ctrl+r",
"command": "editor.action.startFindReplaceAction",
"when": "editorFocus && findInputFocussed"
},
{
"key": "shift+ctrl+w",
"command": "workbench.action.closeAllGroups"
},
// ----------------- 4. REMOVED SHORTCUTS ----------------
{
"key": "ctrl+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "ctrl+u",
"command": "-cursorUndo",
"when": "textInputFocus"
},
{
"key": "ctrl+k down",
"command": "-workbench.action.moveActiveEditorGroupDown"
},
{
"key": "ctrl+k left",
"command": "-workbench.action.moveActiveEditorGroupLeft"
},
{
"key": "ctrl+k right",
"command": "-workbench.action.moveActiveEditorGroupRight"
},
{
"key": "ctrl+k up",
"command": "-workbench.action.moveActiveEditorGroupUp"
},
{
"key": "alt+enter",
"command": "-notebook.cell.executeAndInsertBelow",
"when": "notebookCellListFocused && notebookCellType == 'markup' || notebookCellListFocused && notebookMissingKernelExtension && !notebookCellExecuting && notebookCellType == 'code' || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelSourceCount > 0"
},
{
"key": "alt+enter",
"command": "-debug.openBreakpointToSide",
"when": "breakpointsFocused"
},
{
"key": "f2",
"command": "-editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
},
{
"key": "shift+ctrl+r",
"command": "-rerunSearchEditorSearch",
"when": "inSearchEditor"
},
{
"key": "shift+ctrl+w",
"command": "-workbench.action.closeWindow"
},
{
"key": "ctrl+k shift+ctrl+w",
"command": "-workbench.action.closeAllGroups"
},
{
"key": "shift+ctrl+d",
"command": "-workbench.view.debug",
"when": "viewContainer.workbench.view.debug.enabled"
},
{
"key": "f12",
"command": "-editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "shift+ctrl+[Comma] ctrl+i",
"command": "-testing.toggleInlineTestOutput"
},
{
"key": "shift+ctrl+i",
"command": "-workbench.action.quickchat.toggle",
"when": "hasChatProvider"
},
{
"key": "shift+ctrl+[Comma] shift+ctrl+i",
"command": "-testing.toggleInlineCoverage",
"when": "testing.isTestCoverageOpen"
},
{
"key": "ctrl+f12",
"command": "-editor.action.goToImplementation",
"when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "shift+ctrl+f12",
"command": "-editor.action.peekImplementation",
"when": "editorHasImplementationProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
},
{
"key": "alt+[BracketRight]",
"command": "jupyter.insertCellBelow",
"when": "editorTextFocus && jupyter.hascodecells && !jupyter.webExtension && !notebookEditorFocused"
},
{
"key": "ctrl+shift+[Comma] b",
"command": "-jupyter.insertCellBelow",
"when": "editorTextFocus && jupyter.hascodecells && !jupyter.webExtension && !notebookEditorFocused"
},
{
"key": "shift+alt+[BracketRight]",
"command": "jupyter.insertCellAbove",
"when": "editorTextFocus && jupyter.hascodecells && !jupyter.webExtension && !notebookEditorFocused"
},
{
"key": "ctrl+shift+[Comma] a",
"command": "-jupyter.insertCellAbove",
"when": "editorTextFocus && jupyter.hascodecells && !jupyter.webExtension && !notebookEditorFocused"
},
{
"key": "ctrl+down",
"command": "jupyter.gotoNextCellInFile"
},
{
"key": "ctrl+up",
"command": "jupyter.gotoPrevCellInFile"
},
{
"key": "ctrl+a a",
"command": "editor.action.selectAll"
},
{
"key": "ctrl+a",
"command": "-editor.action.selectAll"
},
{
"key": "alt+w",
"command": "-toggleSearchEditorWholeWord",
"when": "inSearchEditor && searchInputBoxFocus"
},
{
"key": "alt+w",
"command": "-workbench.action.terminal.toggleFindWholeWord",
"when": "terminalFindVisible && terminalHasBeenCreated || terminalFindVisible && terminalProcessSupported"
},
{
"key": "alt+w",
"command": "-toggleFindWholeWord",
"when": "editorFocus"
},
{
"key": "alt+w",
"command": "-toggleSearchWholeWord",
"when": "searchViewletFocus"
},
{
"key": "alt+w",
"command": "editor.emmet.action.wrapWithAbbreviation",
"when": "editorFocus"
},
{
"key": "ctrl+shift+i",
"command": "-workbench.action.toggleDevTools",
"when": "isDevelopment"
},
{
"key": "ctrl+shift+i",
"command": "-notebook.formatCell",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && inCompositeEditor && notebookEditable && !editorReadonly && activeEditor == 'workbench.editor.notebook'"
},
{
"key": "ctrl+shift+i",
"command": "-editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
"key": "ctrl+shift+i",
"command": "-editor.action.formatDocument.none",
"when": "editorTextFocus && !editorHasDocumentFormattingProvider && !editorReadonly"
},
{
"key": "ctrl+shift+i",
"command": "-notebook.format",
"when": "notebookEditable && !editorTextFocus && activeEditor == 'workbench.editor.notebook'"
},
{
"key": "ctrl+shift+[Comma] ctrl+shift+i",
"command": "-testing.toggleInlineCoverage"
},
{
"key": "ctrl+alt+i",
"command": "-workbench.action.chat.open",
"when": "chatPanelParticipantRegistered"
},
{
"key": "ctrl+shift+i",
"command": "workbench.action.chat.openInEditor"
},
]