remap the g:UltiSnipsExpandTrigger to <c-i>, but <tab> still expand snips

Bug #1259812 reported by grissiom on 2013-12-11
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

I'm using the git version of ultisnips, the laster log of it is:

commit 179af2f970549f02fab1329a90cd31a4970cfe45
Merge: 9588754 7265bcb
Author: Holger Rapp <email address hidden>
Date: Mon Dec 2 22:32:31 2013 -0800

    Merge pull request #115 from heytrav/master

    perl: use parent in place of base and uncuddle "else" as suggested by the Perl Best Practices book.

I try to remap the g:UltiSnipsExpandTrigger to <c-j> in order to free the <TAB>, but it still expand the snips with <TAB>.(<c-j> works as well).

My vimrc is here:

All the tests in have passed through...

SirVer (sirver) wrote :

That is a really complete bug report - very well done!!!

Can you check what :verbose imap <tab> and :verbos imap <c-j> give you? UltiSnips only ever takes one hotkey, but maybe ycm (youcompleteme) or some other plugin take the tab key and forward to ultisnips.

Changed in ultisnips:
status: New → Incomplete
grissiom (chaos.proton) wrote :

Oops, sorry that I have mapped the trigger to <c-i> in the vimrc... But the problem still exits:

Here is `:verbose imap <tab>`:

i <Tab> * <C-R>=UltiSnips_ExpandSnippetOrJump()<CR>
        Last set from ~/My_projects/local-etc/vimfiles/bundle/ultisnips/plugin/UltiSnips.vim

Here is `:verbose imap <c-i>`:

i <Tab> * <C-R>=UltiSnips_ExpandSnippetOrJump()<CR>
        Last set from ~/My_projects/local-etc/vimfiles/bundle/ultisnips/plugin/UltiSnips.vim

Strange, those mappings are identical...

To make it simple, I moved YCM out of the bundle folder so I think it has already been disabled.

grissiom (chaos.proton) wrote :

Strange, if I change the mapping to:

let g:UltiSnipsExpandTrigger="<c-e>"
let g:UltiSnipsJumpForwardTrigger="<c-r>"
let g:UltiSnipsJumpBackwardTrigger="<c-t>"

than everything goes OK. I've no idea why <c-i> is special here.

Thank you very much for the hint of ":verbose imap"! :D

SirVer (sirver) wrote :

mmh - that seems strange. The only idea that I can give you now is to try to reduce your .vimrc and plugins to a minimal case that reproduces the problem, maybe we can figure the problem out this way. But if your happy with changing your trigger, we can also set this to invalid and move on.

grissiom (chaos.proton) wrote :

OK, just mark it as invalid and move on. I will reopen it if I am sure it's a bug inside Ultisnips.

Thank you very much.

SirVer (sirver) on 2013-12-14
Changed in ultisnips:
status: Incomplete → Invalid
Alexander Ross (izepax) wrote :

I actually have an similar problem.

I have bind `g:UltiSnipsJumpForwardTrigger` and `g:UltiSnipsJumpBackwardTrigger` to `<tab>` and `<s-tab>`. But `<c-j>` and `<c-k>` still works. I actually used to have `<c-k>` for special characters that can be found in `:digraphs`.

I've also installed it from the GitHub mirror with Vundle.

ultisnips settings:

From `:verbose imap <s-tab>`:
i <S-Tab> * <C-R>=UltiSnips_JumpBackwards()<CR>
        Last set from ~/.dotfiles/vim/bundle/ultisnips/plugin/UltiSnips.vim

From `:verbose imap <c-k>`:
i <C-K> * <C-R>=UltiSnips_JumpBackwards()<CR>
        Last set from ~/.dotfiles/vim/bundle/ultisnips/plugin/UltiSnips.vim

From `:verbose imap <c-j>`:
i <NL> * <C-R>=UltiSnips_JumpForwards()<CR>
        Last set from ~/.dotfiles/vim/bundle/ultisnips/plugin/UltiSnips.vim

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers