I installed YouCompleteMe and UltiSnips together in order to use snippets.

Here is my .vimrc:

call plug#begin() 
Plug 'preservim/NERDTree'
Plug 'ycm-core/YouCompleteMe'
Plug 'SirVer/ultisnips'
call plug#end()

let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'

" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<s-tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

I'm trying to expand snippets by pressing Shift+Tab, but instead of expanding it is reverse scrolling through suggestions. This happens even though I've updated in my .vimrc for Shift+Tab. What should I do now?

  • Welcome to Vi and Vim @AvneeshSirohi! Right now it's hard to understand what you want to accomplish with your question, can you please update it to describe the actual issue (for example, "The key binding of 'Shift+Tab' I configured for UltiSnips does not work as I expected it to, instead of doing X, it does Y." And also try to make it a question, even if it's simply "How can I fix it?" Please take some time to edit and improve your question, that should attract quality answers. Thanks!
    – filbranden
    Apr 28, 2020 at 14:59
  • 1
    I've updated my question I hope it's clear now what I'm trying to ask. Apr 28, 2020 at 15:58
  • Looks great, thanks! I further trimmed your sample vimrc to remove some of the blank and commented lines, so it looks a little more tidy. Cheers!
    – filbranden
    Apr 28, 2020 at 16:16
  • 1
    Try what is written in this post.
    – user938271
    Apr 28, 2020 at 16:47
  • @user938271, I tried above <c-g> don't work either for me. When I press c-g nothing happens. Apr 29, 2020 at 5:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.