0

I have a problem with UltiSnips. It keeps jump backwards even tough I didn't map it in my .vimrc file. My .vimrc look like this

let g:UltiSnipsExpandTrigger="<C-l>"                                             
let g:UltiSnipsJumpForwardTrigger="<C-k>"                                        
let g:UltiSnipsJumpBackwardTrigger="<C-i>"

let g:ycm_key_list_select_completion = ['<Tab>', '<Down>']                       
let g:ycm_key_list_previous_completion = ['<S-Tab>', '<Up>']                     

let g:SuperTabDefaultCompletionType = '<Tab>' 

No there saying anything about <Tab> executing JumpBackwardTrigger. But, when type this:

fpri                             \\ Then hit <tab>, it expands to:
fprintf(stderr, "%s\n", str__);  \\ My cursor at __. YCM need to do the job
                                 \\ when I start typing. Then I hit <tab>
fprintf(stderr, "__\n", str);    \\ But it bring back!!

I have no mapping that involves <tab> key. So, what is causing this?

2

Unfortunately <c-i> and <tab> are parsed as the exact same key by most terminals. You can follow a discussion about this on this neovim issue: https://github.com/neovim/neovim/issues/176

The easiest solution is to pick a different mapping for jumping backwards, like <leader>i. If you really want this fixed, I suggest following the linked issue and looking into leonerd's work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.