UltiSnips not falling back to Supertab

Asked by SilkyB

I know this is supposed to be easy or automatic, but I cannot get UltiSnips to fall back to Supertab when there are no applicable snippets detected.

I'm using Pathogen/Git to manage my plugins. I installed Supertab and confirmed that it works as expected (i.e. pressing <tab> performs keyword completion). After installing UltiSnips, pressing <tab> only performs snippet expansion. If an applicable snippet is not found, the cursor simply moves to the next line.

I've checked :scriptnames to confirm that the scripts are getting loaded in the correct order. Both ":echo did_UltiSnips_vim" and ":echo did_UltiSnips_vim_after" display "1". ":echo g:SuperTabMappingForward" displays "<tab>".

I'm sure this is a simple oversight on my part, but I can't figure out what I'm doing wrong. Any help would be appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
UltiSnips Edit question
Assignee:
No assignee Edit question
Solved by:
SilkyB
Solved:
Last query:
Last reply:
Revision history for this message
SirVer (sirver) said :
#1

Dunno... should just work (TM). Have you checked what <tab> is mapped to? (:verbose map <tab>)

Revision history for this message
SilkyB (z727090) said :
#2

Yeah, everything looks normal as far as I can tell.

:verbose map <tab>
x <Tab> * :call UltiSnips_SaveLastVisualSelection()<CR>gvs
 Last set from ~/.vim/bundle/ultisnips/plugin/UltiSnips.vim
s <Tab> * <Esc>:call UltiSnips_ExpandSnippet()<CR>
 Last set from ~/.vim/bundle/ultisnips/plugin/UltiSnips.vim

:verbose imap <tab>
i <Tab> * <C-R>=UltiSnips_ExpandSnippet()<CR>
 Last set from ~/.vim/bundle/ultisnips/plugin/UltiSnips.vim

I'll keep poking at it.

Revision history for this message
SilkyB (z727090) said :
#3

I finally found what was causing the issue. I had to insert mode mapping ("inoremap <c-n> <down>") conflicting with Supertab (so unrelated to UltiSnip).

:verbose imap <c-n>
i <C-N> <Plug>SuperTabForward
 Last set from ~/Dropbox/projects/vim/bundle/supertab/plugin/supertab.vim

That explains why the cursor was moving down when an applicable snippet wasn't found. Now if only this hadn't taken me hours to troubleshoot :/

Revision history for this message
SirVer (sirver) said :
#4

Glad that you found the issue. You got me worried there for a bit :)