completor.vim icon indicating copy to clipboard operation
completor.vim copied to clipboard

Some problems with UltiSnips integration

Open markwu opened this issue 7 years ago • 2 comments

Problems summary

  1. When popup menu show up, I type <C-N> to choose candidate, the characters before cursor will repeat.
  2. Some snippets does not end with [snip], it is not easy to recognize
  3. ForwardTrigger and BackwardTrigger not working

Environment Information

  • OS: OSX 10.11.6
  • Vim version: 8.0.46 (MacVim)

Provide a minimal .vimrc with less than 50 lines (Required!)

set nocompatible
filetype off

execute 'source ~/.vim/bundle/vim-plug/plug.vim'
call plug#begin('~/.vim/bundle/')

Plug 'junegunn/vim-plug'

" Put your bundle below here
Plug 'maralla/completor.vim'
Plug 'shawncplus/phpcomplete.vim'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Put your bundle above here

call plug#end()

syntax on
filetype plugin indent on

" Put your plugin settings below here
let g:completor_php_omni_trigger = '([$\w]+|use\s*|->[$\w]*|::[$\w]*|implements\s*|extends\s*|class\s+[$\w]+|new\s*)$'

let g:UltiSnipsUsePythonVersion = 2
let g:UltiSnipsExpandTrigger="<C-J>"
let g:UltiSnipsJumpForwardTrigger="<C-J>"
let g:UltiSnipsJumpBackwardTrigger="<C-K>"
" Put _our plugin settings above here

The reproduce ways from Vim starting (Required!)

  1. :e test.php or set ft=php
  2. type <? the popup menu will show up, and you can choose candidate by <C-N>, you will see the characters repeat before the curosr.
  3. type foreach the popup menu will show up, and you can see it not end with [snip], choose it and hit <C-J> to expand it, then you can't not use <C-J> to jump next position

Screen shot (if possible)

ultisnips

markwu avatar Oct 24 '16 17:10 markwu

Now the ultisnips completion will only be trigger with identifiers. Symbols like <? will not trigger completion any more. This is the same as youcompleteme. (#38)

foreach is a php builtin and is used for completion instead of ultisnips, so no [snip].

maralla avatar Oct 26 '16 10:10 maralla

I tested, the symbols does not trigger anymore. But ForwardTrigger and BackwardTrigger still not working.

markwu avatar Oct 27 '16 13:10 markwu