From 1e203b4c4c3c193f733d9a9caccd5807dd5b0176 Mon Sep 17 00:00:00 2001 From: Alex Efros Date: Mon, 18 Dec 2017 03:54:03 +0200 Subject: [PATCH] add hack to keep completing after chaining --- plugin/supertab.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugin/supertab.vim b/plugin/supertab.vim index ba8f4dd..d7a28e1 100644 --- a/plugin/supertab.vim +++ b/plugin/supertab.vim @@ -955,6 +955,22 @@ function! SuperTabCodeComplete(findstart, base) " {{{ exec 'let keys = "' . escape(b:SuperTabChain[1], '<') . '"' " : stop completion and go back to the originally typed text. call feedkeys("\" . keys, 'nt') + + " Hack: Do not stop iterating completions on next SuperTab() call. + let b:supertab_complType_skip = 1 + let b:supertab_complType_save = b:complType + let b:complType = keys + augroup supertab_completion_type + autocmd CompleteDone + \ if exists('b:supertab_complType_skip') | + \ unlet b:supertab_complType_skip | + \ else | + \ let b:complType = b:supertab_complType_save | + \ unlet b:supertab_complType_save | + \ autocmd! supertab_completion_type | + \ endif + augroup END + return [] endfunction " }}}