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')
|
if exists('g:loaded_gitgutter')
|
||||||
" Add `g` prefix to hunk bindings
|
" Add `g` prefix to hunk bindings
|
||||||
|
|
||||||
" Mnemonic: "git hunk <add|undo|preview>"
|
" Mnemonic: "git hunk <add|undo|preview>"
|
||||||
nmap <leader>gha <Plug>(GitGutterStageHunk)
|
nmap <leader>gha <Plug>(GitGutterStageHunk)
|
||||||
xmap <leader>gha <Plug>(GitGutterStageHunk)
|
|
||||||
" TODO: nmap <leader>ghs <Plug>(GitGutterStashHunk)
|
" TODO: nmap <leader>ghs <Plug>(GitGutterStashHunk)
|
||||||
nmap <leader>ghu <Plug>(GitGutterUndoHunk)
|
nmap <leader>ghu <Plug>(GitGutterUndoHunk)
|
||||||
nmap <leader>ghp <Plug>(GitGutterPreviewHunk)
|
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
|
" Add hunk/h version to textobject bindings that use `c` (for `change I
|
||||||
" presume?) (e.g. ic -> ih)
|
" presume?) (e.g. ic -> ih)
|
||||||
omap ih <Plug>(GitGutterTextObjectInnerPending)
|
omap ih <Plug>(GitGutterTextObjectInnerPending)
|
||||||
|
|||||||
Reference in New Issue
Block a user