diff options
author | Teddy Wing | 2017-05-10 21:00:54 +0200 |
---|---|---|
committer | Teddy Wing | 2017-05-10 21:00:54 +0200 |
commit | 69a382bf1d6cd4645dfb4408f757368b069694fc (patch) | |
tree | d64fbbe9ea49b8ea5b60d8823d5913b1ffcfcdd0 | |
parent | 66b4ed72d3bc3a6c03049aa5364f567aab5ae980 (diff) | |
download | vim-gitcha-69a382bf1d6cd4645dfb4408f757368b069694fc.tar.bz2 |
ftplugin/gitcommit: Restore <Plug> mapping
Restore this after 60bc8ea8b3b7be511c4240ca1d7dc1cc1149b113 where I made
a mess experimenting trying to get `complete()` to work.
Take the mapping that we used successfully from that commit and combine
it with our `<Plug>` mappings from before to call our new completion
function.
-rw-r--r-- | ftplugin/gitcommit/gitcha.vim | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ftplugin/gitcommit/gitcha.vim b/ftplugin/gitcommit/gitcha.vim index 9be271d..c81cf26 100644 --- a/ftplugin/gitcommit/gitcha.vim +++ b/ftplugin/gitcommit/gitcha.vim @@ -8,13 +8,10 @@ if exists('g:no_plugin_maps') || exists('g:no_gitcha_maps') finish endif -" if !hasmapto('<Plug>GitchaCompleteSHA') -" imap <buffer> <C-x><C-s> <Plug>GitchaCompleteSHA -" endif +if !hasmapto('<Plug>GitchaCompleteSHA') + imap <buffer> <C-x><C-s> <Plug>GitchaCompleteSHA +endif -" inoremap <buffer> <Plug>GitchaCompleteSHA <C-r>=gitcha#StartGitSHACompletion()<CR> -" inoremap <buffer> <Plug>GitchaCompleteSHA <C-r>=gitcha#GitSHAComplete()<CR> -" inoremap <buffer> <C-x><C-s> <C-r>=gitcha#GitSHAComplete()<CR> -inoremap <C-x><C-s> <C-r>=gitcha#GitSHAComplete()<CR> +inoremap <buffer> <Plug>GitchaCompleteSHA <C-r>=gitcha#GitSHAComplete()<CR> let b:undo_ftplugin = 'iunmap <buffer> <C-x><C-s>' |