Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Enter key conflict with AutoPairs #19

sunaku opened this Issue Jan 17, 2012 · 4 comments


None yet
3 participants

sunaku commented Jan 17, 2012

Both endwise and AutoPairs bind the Enter key in insert mode:

:imap <cr>
i  <CR>        *@AutoPairsReturn()
i  <CR>          <CR><Plug>DiscretionaryEnd

But only AutoPairs' binding is taking effect. How can I make them both work? Thanks.


telemachus commented Jan 23, 2012

I came to ask about the same problem. Reading through other issues here, I found a few related to multiple mappings competing for <CR>:

The last one is particularly worth looking at, since this commit in SuperTab apparently fixed the problem between endwise and SuperTab. However, I can't see how to apply that to this case.

One other clue: @tpope's comments on other issues (here and here) suggest that AutoPairs' use of <expr> is part of the problem. Again, I'm not really sure how best to tackle that part of the equation either.

(I've also posted an issue on AutoPairs repo to see if @jiangmiao has any ideas.)

Trying fix it.

The issue has been fixed in AutoPairs v1.1.5. Let me know If there is any other issue, Thanks.

sunaku commented Jan 25, 2012

It works! Thanks!

tpope added a commit that referenced this issue Apr 11, 2014

Experimental abbreviations
Potentially a partial replacement for remapping <CR>.

References #10, #14, #19, #22.

@sunaku sunaku closed this Dec 29, 2014

aurieh added a commit to aurieh/vim-endwise that referenced this issue Nov 9, 2017

Experimental abbreviations
Potentially a partial replacement for remapping <CR>.

References #10, #14, #19, #22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment