From 3219ccf873f1af2349ccce9efa0a20305ffc253a Mon Sep 17 00:00:00 2001 From: kj_sh604 Date: Mon, 8 Jun 2026 17:14:10 -0400 Subject: refactor: don't break other g commands --- .config/Code/User/keybindings.json | 30 ------------------------------ .config/Code/User/settings.json | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 32 deletions(-) (limited to '.config') diff --git a/.config/Code/User/keybindings.json b/.config/Code/User/keybindings.json index 147e74a..5022bc3 100644 --- a/.config/Code/User/keybindings.json +++ b/.config/Code/User/keybindings.json @@ -282,36 +282,6 @@ "command": "editor.action.showHover", "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" }, - { - "key": "g r n", - "command": "editor.action.rename", - "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" - }, - { - "key": "g r a", - "command": "editor.action.quickFix", - "when": "vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorTextFocus" - }, - { - "key": "g r d", - "command": "editor.action.revealDefinition", - "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" - }, - { - "key": "g r t", - "command": "editor.action.goToTypeDefinition", - "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" - }, - { - "key": "g r i", - "command": "editor.action.goToImplementation", - "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" - }, - { - "key": "g r r", - "command": "editor.action.goToReferences", - "when": "vim.active && vim.mode == 'Normal' && editorTextFocus" - }, // leader actions { "key": "\\ f f", diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index b4e7c20..a5606b2 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -251,11 +251,21 @@ "": true, "": true, "": false, - "": false, "": false, "": false, "": false }, + "vim.normalModeKeyBindingsNonRecursive": [ + { "before": ["g", "r", "n"], "commands": ["editor.action.rename"] }, + { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] }, + { "before": ["g", "r", "d"], "commands": ["editor.action.revealDefinition"] }, + { "before": ["g", "r", "t"], "commands": ["editor.action.goToTypeDefinition"] }, + { "before": ["g", "r", "i"], "commands": ["editor.action.goToImplementation"] }, + { "before": ["g", "r", "r"], "commands": ["editor.action.goToReferences"] } + ], + "vim.visualModeKeyBindingsNonRecursive": [ + { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] } + ], "vim.history": 1000, "vim.hlsearch": true, "vim.incsearch": true, @@ -323,4 +333,4 @@ "files.associations": { "cgitrc": "shellcheckrc" } -} \ No newline at end of file +} -- cgit v1.2.3