diff options
| -rw-r--r-- | autoload/gitcha.vim | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/autoload/gitcha.vim b/autoload/gitcha.vim index 6defd61..bde75a2 100644 --- a/autoload/gitcha.vim +++ b/autoload/gitcha.vim @@ -1,5 +1,8 @@ +" Save user-defined completefunc so it can be restored after running this +" custom completion function  let s:old_completefunc = &completefunc +" Completion for Git SHAs in the current repository  function! gitcha#GitSHAComplete(findstart, base)  	if a:findstart  		" locate the start of the word @@ -26,6 +29,7 @@ function! gitcha#GitSHAComplete(findstart, base)  	return matches  endfunction +" Allow mappings to initiate completion  function! gitcha#StartGitSHACompletion()  	set completefunc=gitcha#GitSHAComplete  	return "\<C-x>\<C-u>" | 
