vim:keys: Xmap <leader>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.
This commit is contained in:
@@ -115,14 +115,15 @@ endif
|
||||
|
||||
if exists('g:loaded_gitgutter')
|
||||
" Add `g` prefix to hunk bindings
|
||||
|
||||
" Mnemonic: "git hunk <add|undo|preview>"
|
||||
nmap <leader>gha <Plug>(GitGutterStageHunk)
|
||||
xmap <leader>gha <Plug>(GitGutterStageHunk)
|
||||
" TODO: nmap <leader>ghs <Plug>(GitGutterStashHunk)
|
||||
nmap <leader>ghu <Plug>(GitGutterUndoHunk)
|
||||
nmap <leader>ghp <Plug>(GitGutterPreviewHunk)
|
||||
|
||||
" StageHunk can be used for single lines. Mnemonic w/o `h`unk
|
||||
xmap <leader>ga <Plug>(GitGutterStageHunk)
|
||||
|
||||
" Add hunk/h version to textobject bindings that use `c` (for `change I
|
||||
" presume?) (e.g. ic -> ih)
|
||||
omap ih <Plug>(GitGutterTextObjectInnerPending)
|
||||
|
||||
Reference in New Issue
Block a user