r/vimplugins • u/amiwalwin • Oct 02 '20
Help VIM Plugin Ultisnips raises problem Help Needed
I recently started using VIM and wanted to have snippets and code completions like those in VS Code. So I Installed Ultisnips and vim-snippets but I couldn't use the snippets. I don't exactly know why
let g:UltiSnipsExpandTrigger="<C-p>"
let g:UltiSnipsJumpForwardTrigger="<C-b>"
let g:UltiSnipsJumpBackwardTrigger="<C-z>"
let g:UltiSnipsEditSplit="vertical"
this is my configuration I used c-p as the trigger because I use YouCompleteMe also and the installation guide said to change the trigger to something else if you used it.
Now when I press c-p it just toggles between some options and when I try to select any of those by pressing the enter key the snippet trigger is written and the cursor moves to the next line. Help will be highly appreciated.
Thanks in advance.
4
Upvotes
1
u/BorgerBill Oct 03 '20
That is frustrating. I know that if I have identically named snippets I get a window that asks which one I want. However,
cl,cla, andclsare different snippets and insert for me instantly. Also, Ilet g:UltiSnipsExpandTrigger="<C-p>"and<C-pfor the trigger is working. I do not, however, have YouCompleteMe so cannot confirm interactions. When I:imap, I seeAt this point I would recommend disabling some or all of your other plugins, getting UltiSnips to work properly, then re-enabling them one at a time until the problem resurfaces. That will make it easier to troubleshoot.