From 8b37abc24030ae58570e27f66ad955d2189badb1 Mon Sep 17 00:00:00 2001 From: pompydev Date: Sat, 7 Jun 2025 13:47:09 +0900 Subject: [PATCH] vscode: add auto increment keybindings --- modules/home-manager/vscode.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/home-manager/vscode.nix b/modules/home-manager/vscode.nix index 59b80cf..e17daa5 100644 --- a/modules/home-manager/vscode.nix +++ b/modules/home-manager/vscode.nix @@ -69,6 +69,7 @@ }; keybindings = [ + # git { key = "ctrl+alt+s"; command = "git.stageSelectedRanges"; @@ -84,6 +85,24 @@ command = "git.revertSelectedRanges"; when = "editorTextFocus && !operationInProgress && resourceScheme == 'file'"; } + + # snippet + { + key = "alt+i"; + command = "editor.action.insertSnippet"; + args = { + "snippet" = "$CURSOR_INDEX"; + }; + when = "editorTextFocus && editorHasMultipleSelections"; + } + { + key = "alt+n"; + command = "editor.action.insertSnippet"; + args = { + "snippet" = "$CURSOR_NUMBER"; + }; + when = "editorTextFocus && editorHasMultipleSelections"; + } ]; enableExtensionUpdateCheck = false;