From 0108d430e9885547517c4c33050cc6d0cac85fc3 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 29 Apr 2017 07:19:24 +0200 Subject: ftplugin/gitcommit: Make completion mapping user-editable Instead of forcing the mapping '' to activate Git SHA completion, allow users to define a different custom mapping. --- ftplugin/gitcommit/gitcha.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ftplugin/gitcommit') diff --git a/ftplugin/gitcommit/gitcha.vim b/ftplugin/gitcommit/gitcha.vim index ecd1e90..cdaea61 100644 --- a/ftplugin/gitcommit/gitcha.vim +++ b/ftplugin/gitcommit/gitcha.vim @@ -1 +1,7 @@ -inoremap gitcha#StartGitSHACompletion() +if !exists('g:no_plugin_maps') && !exists('g:no_gitcha_maps') + if !hasmapto('GitchaCompleteSHA') + imap GitchaCompleteSHA + endif + + inoremap GitchaCompleteSHA gitcha#StartGitSHACompletion() +endif -- cgit v1.2.3