From fb90ae3142ba51c38d5441caf742ab6c6059079d Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 26 Aug 2022 08:34:28 +0200 Subject: [PATCH] vim:keys: Xmap `ga` to git add selection As `GitGutterStageHunk` adds only the selected lines and not the full hunk, remove the `h` for hunk from the mapping. --- .config/vim/vimrc.d/40-keys.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index 4dc7de3..77212e1 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -115,14 +115,15 @@ endif if exists('g:loaded_gitgutter') " Add `g` prefix to hunk bindings - " Mnemonic: "git hunk " nmap gha (GitGutterStageHunk) - xmap gha (GitGutterStageHunk) " TODO: nmap ghs (GitGutterStashHunk) nmap ghu (GitGutterUndoHunk) nmap ghp (GitGutterPreviewHunk) + " StageHunk can be used for single lines. Mnemonic w/o `h`unk + xmap ga (GitGutterStageHunk) + " Add hunk/h version to textobject bindings that use `c` (for `change I " presume?) (e.g. ic -> ih) omap ih (GitGutterTextObjectInnerPending)