Open M4rtinK opened 7 years ago
Same here, this happened after the update to vim 8, on vim 7 works fine.
If you use Vundle, or any other plugin manager, moving supertab as the first plugin being loaded should solve the issue.
The problem is caused by an experimental feature that is supposed to save users current
Quoting the author:
" Note: this could cause more problems than it solves if it picks up <s-tab>
" mappings from other plugins and misinterprets them, etc, so this block is
" experimental and could be removed later.
To be precise, make sure you load supertab before YouCompleteMe
Having the same issue, @empijei fix didn't solve it for me unfortunately. Using it on neovim latest head, no YCM. Put supertab at the top of my vim-plug
block but the problem is still there.
Unfortunately @empijei's solution didn't work for me either.
@miessos are you on neovim too? Could you please share a list of plugins you're using/the vimrc lines before supertab plug?
@empijei see attached files: scriptnames.pdf is output from - well... obviously :) - the scriptnames command within vim and the other is the .vimrc.bundle I'm using.
I'm using VIM 8.0 (2016 Sep 12, compiled May 25 2017 12:22:08)
I'm sorry but I could not find the problem there. My best guess is to comment out lines in plugin/supertab.vim in the supertab bundle around line 993 in order to avoid picking up S-Tab mappings.. :disappointed:
@empijei your guess does suppress the error and supertab seems still functional
Happy to read that :)
same error. (neovim)
Have you tried this: https://github.com/ervandew/supertab/issues/185#issuecomment-282976512 ?
@empijei not working
@metalelf0 Works!!!
The problem it is still there after years...
The problem still exists....
Get the same problem after installing some new plugins installed (tpope/vim-fugitive, tpope/vim-fugitive and tpope/vim-fugitive)
still the same issue yes.. nvim 0.5
this repo is dead for some years now anyways..
even with the forked repo i do the imap tab and i get that it is defined on UltiSnips and not on supertab (even putting it first or last in the plugin list)
I solve it with this:
I went to the directory: ~ / .vim / plugged / supertab / plugin (the directory will depend on where you save your plugins)
with neovim enter the supertab.vim file and look for the pumvisible line (to search in vim, in normal mode put / and pumvisible ())
after this, delete everything that is in the function pumvisible (), now save the changes
in my case when I save the changes it told me that an endfunction was missing in a line
what you have to do is enter supertab.vim again and go to the last line, there you put an endfunction in another line
and problem solved¡
From line 247 to 259, just rewrite the function like this:
function! SuperTabLongestHighlight(dir) " {{{
" When longest highlight is enabled, this function is used to do the actual
" selection of the completion popup entry.
if !pumvisible()
return ''
endif
if a:dir == -1
return "\<up>"
else
return "\<down>"
endif
endfunction " }}}
Don't know vim script, but I am guessing for some reason his vim supports the oneliner if else syntax and some of ours don't? In any case if you still have an error after that, look in your own vimrc, I had some stuff copied from the readme which used the same syntax and turned out I didn't even need it.
Sorry, I hate myself, probably nicer like this:
function! SuperTabLongestHighlight(dir) " {{{
" When longest highlight is enabled, this function is used to do the actual
" selection of the completion popup entry.
if !pumvisible()
return ''
endif
if a:dir == -1
return "\<up>"
endif
return "\<down>"
endfunction " }}}
I don't know...
Search for this block in supertab.vim and delete this whole block (it does says its experimental and could cause problems):
" save user's existing <s-tab> mapping if they have one.
" Note: this could cause more problems than it solves if it picks up <s-tab>
" mappings from other plugins and misinterprets them, etc, so this block is
" experimental and could be removed later.
if g:SuperTabMappingForward ==? '<s-tab>' || g:SuperTabMappingBackward ==? '<s-tab>'
let stab = maparg('<s-tab>', 'i')
if s:has_dict_maparg
let existing_stab = maparg('<s-tab>', 'i', 0, 1)
if len(existing_stab) && existing_stab.expr
let stab = substitute(stab, '<SID>\c', '<SNR>' . existing_stab.sid . '_', '')
let stab = substitute(stab, '()$', '', '')
let s:ShiftTab = function(stab)
let stab = ''
endif
endif
if stab != ''
let stab = substitute(stab, '\(<[-a-zA-Z0-9]\+>\)', '\\\1', 'g')
exec "let stab = \"" . stab . "\""
let s:ShiftTab = stab
endif
endif
Or just use my fork https://github.com/LutfiLokman/supertab
After updating supertab from the master branch I'm getting the following error at vim startup:
The issue happens on Fedora 25 with vim version: