diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index e6b634b..89cffe2 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -116,9 +116,11 @@ vnoremap # y?\V=escape(@",'?\') nnoremap gp '`[' . strpart(getregtype(), 0, 1) . '`]' if exists('g:loaded_fugitive') - nnoremap ga :G add -p - nnoremap gcc :G commit - nnoremap gcd :Gcd + nmap gc :G commit + + nmap ga :G add -- % + nmap gs :G stash -- % + nmap gu :G checkout -- % else " only works if a file is already opened nnoremap gcd :cd %:h cd `git rev-parse --show-toplevel` @@ -126,8 +128,11 @@ endif if exists('g:loaded_gitgutter') " Add `g` prefix to hunk bindings - nmap ghs (GitGutterStageHunk) - xmap ghs (GitGutterStageHunk) + + " Mnemonic: "git hunk " + nmap gha (GitGutterStageHunk) + xmap gha (GitGutterStageHunk) + " TODO: nmap ghs (GitGutterStashHunk) nmap ghu (GitGutterUndoHunk) nmap ghp (GitGutterPreviewHunk)