diff options
-rw-r--r-- | ftplugin/gitcommit.vim | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index daed923..19577d2 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -21,4 +21,21 @@ function! GitSHAComplete(findstart, base) return matches endfunction -set completefunc=GitSHAComplete +function! StartGitSHACompletion() + let old_completefunc = &completefunc + + set completefunc=GitSHAComplete + return "\<C-x>\<C-u>" + + let &completefunc = old_completefunc +endfunction + +function! ASDF() + return "\<C-p>" +endfunction + +" inoremap <expr> <C-x><C-s> StartGitSHACompletion() +" inoremap <C-x><C-s> <C-r>=StartGitSHACompletion()<CR> +inoremap <expr> <C-x><C-s> StartGitSHACompletion() + +inoremap <C-v> <C-r>=ASDF()<CR> |