Skip to content

Expands UltiSnips snippet instead of progressing through popup completion menu #11

@gotgenes

Description

@gotgenes

Example VIMRC

set nocompatible

set runtimepath+=~/.vim/plugins/repos/github.com/Shougo/dein.vim

" Required:
call dein#begin('~/.vim/plugins')

" Let dein manage dein
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/neocomplete.vim')
call dein#add('SirVer/ultisnips')
call dein#add('honza/vim-snippets')
call dein#add('neitanod/vim-clevertab')
call dein#end()

filetype plugin indent on
syntax enable

if dein#check_install()
  call dein#install()
endif

let g:neocomplete#enable_at_startup = 1

call CleverTab#NeoCompleteFirst()

Steps to reproduce

  1. Start Vim using the VIMRC above and edit the VIMRC above
  2. Invoke :call CleverTab#NeoCompleteFirst() (See discussion in Calling the function or defining the mappings in .vimrc doesn't work #1.)
  3. Go into insert mode and start a new line.
  4. Type c.
  5. Hit <Tab> to open the completion popup menu.
  6. Continue to hit <Tab> until c) is highlighted.
  7. Hit <Tab> one more time.
  8. Observe that, instead of cycling past this entry, the c) copyright snippet gets expanded.

Expected outcome:

<Tab> would have continued to cycle through the popup completion menu, rather than invoke the snippet.

Note this behavior is present even if g:UltiSnipsExpandTrigger is set to something other than <Tab>, e.g.,

let g:UltiSnipsExpandTrigger = '<F5>'

I think the priority of checking pumvisible needs to be higher (e.g., first thing checked) when CleverTab is handling <Tab>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions