From 0f37ab4b31346b713788fb79c4d5ab2329db5bf5 Mon Sep 17 00:00:00 2001 From: Wilfried OLLIVIER Date: Wed, 4 May 2022 07:37:53 +0200 Subject: [PATCH] Rework git vsc shortcuts --- keybindings.json | 65 ++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/keybindings.json b/keybindings.json index 183a523..ab20e7d 100644 --- a/keybindings.json +++ b/keybindings.json @@ -130,17 +130,6 @@ "command": "-editor.action.showHover", "when": "editorTextFocus" }, - // Diff navigation - { - "key": "ctrl+d n", - "command": "workbench.action.compareEditor.nextChange", - "when": "textCompareEditorVisible" - }, - { - "key": "ctrl+d p", - "command": "workbench.action.compareEditor.previousChange", - "when": "textCompareEditorVisible" - }, // Error navigation { "key": "ctrl+e n", @@ -177,6 +166,11 @@ "command": "-extension.vim_ctrl+o", "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, + { + "key": "shift+alt+[Period]", + "command": "-gitlens.gitCommands", + "when": "!gitlens:disabled && config.gitlens.keymap == 'alternate'" + }, // Notifications { "key": "ctrl+y ;", @@ -219,36 +213,40 @@ }, // Git { - "key": "ctrl+g s", - "command": "git.stage" + "key": "cmd+g cmd+c", + "command": "workbench.action.addComment" }, { - "key": "ctrl+g u", - "command": "git.unstage" + "key": "shift+cmd+g", + "command": "pr:github.focus" }, { - "key": "ctrl+g s", - "command": "git.stageSelectedRanges", - "when": "isInDiffEditor" + "key": "ctrl+g n", + "command": "workbench.action.compareEditor.nextChange", }, { - "key": "ctrl+g u", - "command": "git.unstageSelectedRanges", - "when": "isInDiffEditor" + "key": "ctrl+g n", + "command": "workbench.action.editor.nextChange", }, { - "key": "ctrl+g o", - "command": "git.openChange" + "key": "ctrl+g n", + "command": "workbench.action.editor.nextChange", + "when": "editorTextFocus && !textCompareEditorActive" }, { - "key": "ctrl+k ctrl+alt+s", - "command": "-git.stageSelectedRanges", - "when": "isInDiffEditor" + "key": "ctrl+g p", + "command": "workbench.action.editor.previousChange", + "when": "editorTextFocus && !textCompareEditorActive" }, { - "key": "ctrl+k ctrl+u", - "command": "-git.unstageSelectedRanges", - "when": "isInDiffEditor" + "key": "ctrl+g n", + "command": "workbench.action.compareEditor.nextChange", + "when": "textCompareEditorVisible" + }, + { + "key": "ctrl+g p", + "command": "workbench.action.compareEditor.previousChange", + "when": "textCompareEditorVisible" }, // Magit { @@ -285,15 +283,6 @@ "key": "ctrl+[BracketRight]", "command": "magit.process-log" }, - // Git - { - "key": "cmd+g cmd+c", - "command": "workbench.action.addComment" - }, - { - "key": "shift+cmd+g", - "command": "pr:github.focus" - }, // Magit resets { "key": "k",