From da46a8b7929f6c39704bef0f5ce27d774dc1c04e Mon Sep 17 00:00:00 2001 From: Pablu23 Date: Wed, 3 Sep 2025 09:05:19 +0200 Subject: [PATCH] Add keybindings and settings for vscode / Code OSS --- .config/Code - OSS/User/keybindings.json | 91 ++++++++++++++ .config/Code - OSS/User/settings.json | 147 +++++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 .config/Code - OSS/User/keybindings.json create mode 100644 .config/Code - OSS/User/settings.json diff --git a/.config/Code - OSS/User/keybindings.json b/.config/Code - OSS/User/keybindings.json new file mode 100644 index 0000000..0a4938a --- /dev/null +++ b/.config/Code - OSS/User/keybindings.json @@ -0,0 +1,91 @@ +// Place your key bindings in this file to override the defaults +[ + { + "key": "h", + "command": "editor.action.scrollLeftHover", + "when": "editorHoverFocused" + }, + { + "key": "j", + "command": "editor.action.scrollDownHover", + "when": "editorHoverFocused" + }, + { + "key": "k", + "command": "editor.action.scrollUpHover", + "when": "editorHoverFocused" + }, + { + "key": "l", + "command": "editor.action.scrollRightHover", + "when": "editorHoverFocused" + }, + { + "key": "ctrl+h", + "command": "workbench.action.previousEditor", + }, + { + "key": "ctrl+l", + "command": "workbench.action.nextEditor", + }, + //{ + // "key": "ctrl+n", + // "command": "workbench.view.explorer", + // "when": + //}, + { + "key": "space e", + "command": "workbench.action.toggleSidebarVisibility", + "when": "filesExplorerFocus && !inputFocus" + }, + { + "key": "a", + "command": "explorer.newFile", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "f", + "command": "explorer.newFolder", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "r", + "command": "renameFile", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "", + "command": "filesExplorer.cut", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "y", + "command": "filesExplorer.copy", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" + }, + { + "key": "p", + "command": "filesExplorer.paste", + "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" + }, + { + "key": "ctrl+t", + "command": "workbench.action.focusActiveEditorGroup", + "when": "terminalFocus" + }, + { + "key": "ctrl+t", + "command": "workbench.action.terminal.focus", + "when": "!terminalFocus" + }, + { + "key": "ctrl+n", + "command": "selectNextCodeAction", + "when": "codeActionMenuVisible" + }, + { + "key": "ctrl+p", + "command": "selectPrevCodeAction", + "when": "codeActionMenuVisible" + } +] diff --git a/.config/Code - OSS/User/settings.json b/.config/Code - OSS/User/settings.json new file mode 100644 index 0000000..2b5256c --- /dev/null +++ b/.config/Code - OSS/User/settings.json @@ -0,0 +1,147 @@ +{ + "svelte.enable-ts-plugin": true, + "workbench.sideBar.location": "right", + "vim.leader": "", + "editor.cursorSurroundingLines": 8, + "vim.smartRelativeLine": true, + "vim.useSystemClipboard": true, + "vim.highlightedyank.enable": true, + "vim.highlightedyank.color": "#a9dc7660", + "vim.highlightedyank.duration": 250, + "vim.normalModeKeyBindings": [ + { + "before": [ + "g", + "p", + "d" + ], + "commands": [ + "editor.action.peekDefinition" + ] + }, + { + "before": [ + "K" + ], + "commands": [ + "editor.action.showDefinitionPreviewHover" + ] + }, + { + "before": [ + "g", + "i" + ], + "commands": [ + "editor.action.goToImplementation" + ] + }, + { + "before": [ + "g", + "p", + "i" + ], + "commands": [ + "editor.action.peekImplementation" + ] + }, + { + "before": [ + "", + "c", + "a" + ], + "commands": [ + "editor.action.quickFix" + ] + }, + { + "before": [ + "g", + "r" + ], + "commands": [ + "editor.action.referenceSearch.trigger" + ] + }, + { + "before": [ + "g", + "t" + ], + "commands": [ + "editor.action.goToTypeDefinition" + ] + }, + { + "before": [ + "g", + "p", + "t" + ], + "commands": [ + "editor.action.peekTypeDefinition" + ] + }, + { + "before": [ + "", + "g", + "f" + ], + "commands": [ + "editor.action.formatDocument" + ] + }, + { + "before": [ + "", + "e" + ], + "commands": [ + "workbench.view.explorer" + ] + }, + { + "before": [ + "", + "e" + ], + "commands": [ + "workbench.view.explorer" + ] + }, + { + "before": [ + "g", + "c" + ], + "commands": [ + "editor.action.commentLine" + ] + } + ], + "workbench.colorTheme": "Catppuccin Frappé", + "git.autofetch": true, + "[svelte]": { + "editor.defaultFormatter": "svelte.svelte-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "vscode.typescript-language-features" + }, + "explorer.fileNesting.patterns": { + "*.ts": "${capture}.js", + "*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts", + "*.jsx": "${capture}.js", + "*.tsx": "${capture}.ts", + "tsconfig.json": "tsconfig.*.json", + "package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock", + "*.sqlite": "${capture}.${extname}-*", + "*.db": "${capture}.${extname}-*", + "*.sqlite3": "${capture}.${extname}-*", + "*.db3": "${capture}.${extname}-*", + "*.sdb": "${capture}.${extname}-*", + "*.s3db": "${capture}.${extname}-*" + }, +}