Problem using alternate key mapping #82

asivitz opened this Issue Jan 11, 2012 · 2 comments

3 participants


There's a problem in the keybinding code that prevents me from mapping snipmate to another key.

If I put let g:snips_trigger_key='' in my vimrc, then if I try to use to trigger the snippet, instead of the snippet I get an autocomplete menu. I assume it is having trouble with SuperTab, however, the reason I'm remapping snipmate is to avoid conflicts.

If I type :imap to list all the bindings, I find these snipmate lines:
i * =snipMate#BackwardsSnippet()
i * =snipMate#ShowAvailableSnips()

For some reason it is mapped to BackwardsSnippet instead. But, the command doesn't work anyway.

if I remove this line from after/plugin/snipmate.vim:
exec 'ino ' . g:snips_trigger_key_backwards . '> =snipMate#BackwardsSnippet()'

Then it works.
i * u=snipMate#TriggerSnippet()
(and the snippet comes out fine)

This works for me, as I don't need the reverse snippet binding, but it's not really a good solution to the problem.


If g:snips_trigger_key was set but g:snips_trigger_key_backwards was not, the latter would be set to the former with shift pressed. In this case Vim sees them as the same thing since it can't differentiate between <C-B> and <S-C-B>. So Vim mapped an action to <C-B> then mapped another to the same key. This is fixed in the latest commit with <Plug> mappings.

@ajzafar ajzafar closed this Apr 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment