diff options
author | Teddy Wing | 2017-04-29 07:19:24 +0200 |
---|---|---|
committer | Teddy Wing | 2017-04-29 07:24:52 +0200 |
commit | 0108d430e9885547517c4c33050cc6d0cac85fc3 (patch) | |
tree | cba89300a4361cae12cb135a0fd6f6cd83fc3f17 | |
parent | 6907f20c33821c7c9e7c9b9b7fb7c111a38216cb (diff) | |
download | vim-gitcha-0108d430e9885547517c4c33050cc6d0cac85fc3.tar.bz2 |
ftplugin/gitcommit: Make completion mapping user-editable
Instead of forcing the mapping '<C-x><C-s>' to activate Git SHA
completion, allow users to define a different custom mapping.
-rw-r--r-- | ftplugin/gitcommit/gitcha.vim | 8 |
1 files changed, 7 insertions, 1 deletions
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 <expr> <C-x><C-s> gitcha#StartGitSHACompletion() +if !exists('g:no_plugin_maps') && !exists('g:no_gitcha_maps') + if !hasmapto('<Plug>GitchaCompleteSHA') + imap <buffer> <C-x><C-s> <Plug>GitchaCompleteSHA + endif + + inoremap <buffer> <expr> <Plug>GitchaCompleteSHA gitcha#StartGitSHACompletion() +endif |