diff options
| author | kj_sh604 | 2026-06-08 18:12:00 -0400 |
|---|---|---|
| committer | kj_sh604 | 2026-06-08 18:12:00 -0400 |
| commit | fc9ac023636927b1255f5f72fa6823c92ff683d4 (patch) | |
| tree | dcd77bd3743d72d35fa4a4bbd76dcf7241b7cbee /.config/Code/User | |
| parent | 3219ccf873f1af2349ccce9efa0a20305ffc253a (diff) | |
refactor: better keymap remap method
Diffstat (limited to '')
| -rw-r--r-- | .config/Code/User/keybindings.json | 55 | ||||
| -rw-r--r-- | .config/Code/User/settings.json | 14 |
2 files changed, 12 insertions, 57 deletions
diff --git a/.config/Code/User/keybindings.json b/.config/Code/User/keybindings.json index 5022bc3..acee1bd 100644 --- a/.config/Code/User/keybindings.json +++ b/.config/Code/User/keybindings.json @@ -276,55 +276,6 @@ "command": "workbench.action.previousEditorInGroup", "when": "vim.active && vim.mode == 'Normal'" }, - // lsp (mirrors some of my neovim lsp keymaps) - { - "key": "shift+k", - "command": "editor.action.showHover", - "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" - }, - // leader actions - { - "key": "\\ f f", - "command": "workbench.action.quickOpen", - "when": "vim.active && vim.mode == 'Normal'" - }, - { - "key": "\\ f g", - "command": "workbench.view.search.focus", - "when": "vim.active && vim.mode == 'Normal'" - }, - { - "key": "\\ f b", - "command": "workbench.action.quickOpenPreviousRecentlyUsedEditor", - "when": "vim.active && vim.mode == 'Normal'" - }, - { - "key": "\\ e", - "command": "workbench.action.problems.focus", - "when": "vim.active && vim.mode == 'Normal'" - }, - { - "key": "\\ shift+f", - "command": "editor.action.formatDocument", - "when": "vim.active && vim.mode == 'Normal'" - }, - // .code-vimrc leader replicas - { - "key": "\\ o", - "command": "vim.remap", - "args": { - "commands": [{"command": ":jumps"}] - }, - "when": "vim.active && vim.mode == 'Normal'" - }, - { - "key": "\\ p", - "command": "vim.remap", - "args": { - "after": ["\"", "+", "P"] - }, - "when": "vim.active && vim.mode == 'Normal'" - }, // ai inline completion (mirrors my neovim minuet keymaps) { "key": "alt+a", @@ -340,11 +291,5 @@ "key": "alt+shift+enter", "command": "editor.action.inlineSuggest.commit", "when": "editorTextFocus && vim.active && vim.mode == 'Insert'" - }, - // copilot inline chat (mirrors my neovim opencode keymaps) - { - "key": "\\ i", - "command": "inlineChat.start", - "when": "vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookAgent && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookInline && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookInline && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookAgent && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookInline && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookInline && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook'" } ] diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index a5606b2..af03907 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -256,6 +256,15 @@ "<C-w>": false }, "vim.normalModeKeyBindingsNonRecursive": [ + { "before": ["K"], "commands": ["editor.action.showHover"] }, + { "before": ["\\", "f", "f"], "commands": ["workbench.action.quickOpen"] }, + { "before": ["\\", "f", "g"], "commands": ["workbench.view.search.focus"] }, + { "before": ["\\", "f", "b"], "commands": ["workbench.action.quickOpenPreviousRecentlyUsedEditor"] }, + { "before": ["\\", "e"], "commands": ["workbench.action.problems.focus"] }, + { "before": ["\\", "F"], "commands": ["editor.action.formatDocument"] }, + { "before": ["\\", "o"], "commands": [{"command": "vim.remap", "args": {"commands": [{ "command": ":jumps" }]}}] }, + { "before": ["\\", "p"], "commands": [{"command": "vim.remap", "args": {"after": ["\"", "+", "P"]}}] }, + { "before": ["\\", "i"], "commands": ["inlineChat.start"] }, { "before": ["g", "r", "n"], "commands": ["editor.action.rename"] }, { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] }, { "before": ["g", "r", "d"], "commands": ["editor.action.revealDefinition"] }, @@ -264,7 +273,8 @@ { "before": ["g", "r", "r"], "commands": ["editor.action.goToReferences"] } ], "vim.visualModeKeyBindingsNonRecursive": [ - { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] } + { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] }, + { "before": ["\\", "i"], "commands": ["inlineChat.start"] } ], "vim.history": 1000, "vim.hlsearch": true, @@ -287,7 +297,7 @@ "statusBar.debuggingForeground": "#ffffff", "statusBar.foreground": "#ffffff", "statusBar.noFolderBackground": "#303030", - "statusBar.noFolderForeground": "#ffffff", + "statusBar.noFolderForeground": "#ffffff" }, "workbench.editor.decorations.badges": false, "workbench.editor.decorations.colors": false, |
