diff --git a/doc/supertab.txt b/doc/supertab.txt index a2b90ec..1f57ee0 100644 --- a/doc/supertab.txt +++ b/doc/supertab.txt @@ -315,6 +315,8 @@ something that is supported. Alternatively, you can escape the with Enhanced longest match support *supertab-longestenhanced* *g:SuperTabLongestEnhanced* +g:SuperTabMappingTabManual (default value: ) + g:SuperTabLongestEnhanced (default value: 0) When enabled and 'longest' is in your |completeopt| setting, supertab will diff --git a/plugin/supertab.vim b/plugin/supertab.vim index 2d1cd26..6944839 100644 --- a/plugin/supertab.vim +++ b/plugin/supertab.vim @@ -70,6 +70,10 @@ set cpo&vim " Global Variables {{{ + if !exists("g:SuperTabMappingTabManual") + let g:SuperTabMappingTabManual='' + endif + if !exists("g:SuperTabDefaultCompletionType") let g:SuperTabDefaultCompletionType = "" endif @@ -905,7 +909,9 @@ endfunction " }}} " map a regular tab to ctrl-tab (note: doesn't work in console vim) exec 'inoremap ' . g:SuperTabMappingTabLiteral . ' ' - imap =ManualCompletionEnter() + if !hasmapto( g:SuperTabMappingTabManual , 'i') + exec 'inoremap ' . g:SuperTabMappingTabManual . ' =ManualCompletionEnter()' + endif imap