UltiSnips and YouCompleteMe

前端 未结 14 1908
囚心锁ツ
囚心锁ツ 2020-12-07 06:40

I have bundles ultisnips and youcompleteme installed on my macvim. The problem is that ultisnips doesn\'t work because tab is bound by ycm. I tried putting let g:UltiS

14条回答
  •  忘掉有多难
    2020-12-07 07:31

    Another option is using the SuperTab plugin:

    " if you use Vundle, load plugins:
    Bundle 'ervandew/supertab'
    Bundle 'Valloric/YouCompleteMe'
    Bundle 'SirVer/ultisnips'
    
    " make YCM compatible with UltiSnips (using supertab)
    let g:ycm_key_list_select_completion = ['', '']
    let g:ycm_key_list_previous_completion = ['', '']
    let g:SuperTabDefaultCompletionType = ''
    
    " better key bindings for UltiSnipsExpandTrigger
    let g:UltiSnipsExpandTrigger = ""
    let g:UltiSnipsJumpForwardTrigger = ""
    let g:UltiSnipsJumpBackwardTrigger = ""
    

    Here YouCompleteMe is bound to a different combination Ctrln, but then that combination is bound to tab through SuperTab. UltiSnips and SuperTab play nice together, so you can then just bind UltiSnips to tab directly and everything will work out.

提交回复
热议问题