0

I can navigate up and down in the list, but if I press Enter when one of them is selected, it just inserts that value, e.g. html5 and exists from the dropdown. How can I select one and have the snippet triggered?

This is my snippet config:

  Plugin 'SirVer/ultisnips'
  Plugin 'honza/vim-snippets'

I'm also using Valloric/YouCompleteMe. No special config for that plugin, though.

enter image description here

martins
  • 9,669
  • 11
  • 57
  • 85
  • I have the exact [same problem](https://stackoverflow.com/questions/59685512/how-to-expand-an-ultisnips-snippet-using-c-y-in-the-youcompleteme-pop-up-menu). Did you find any solution for that since then? – Saeed Ahadian Jan 10 '20 at 18:20
  • I wrote a solution to this problem, you can check it out [here](https://stackoverflow.com/questions/59685512/how-to-expand-an-ultisnips-snippet-using-c-y-in-the-youcompleteme-pop-up-menu/59865970#59865970). – Saeed Ahadian Jan 22 '20 at 18:22

1 Answers1

1

Try :help ultisnips

g:UltiSnipsExpandTrigger               <tab>
g:UltiSnipsListSnippets                <c-tab>
g:UltiSnipsJumpForwardTrigger          <c-j>
g:UltiSnipsJumpBackwardTrigger         <c-k>

In my case I have:

" snippets
let g:UltiSnipsExpandTrigger="<C-j>"
let g:UltiSnipsJumpForwardTrigger="<C-j>"
let g:UltiSnipsJumpBackwardTrigger="<C-k>"
let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsListSnippets="<C-Space>"
SergioAraujo
  • 11,069
  • 3
  • 50
  • 40