Evil with autocomplete mode

Štěpán Němec stepnem at gmail.com
Sat Jul 30 14:29:15 CEST 2011


On Sat, 30 Jul 2011 11:36:33 +0200
Neeraj Sharma wrote:

> I've found evil is not compatible with the auto-complete mode. Not sure how
> many people would be using this but it gets annoying as it somehow causes
> ESC or C-[ to not switch evil to normal mode. I have disabled auto-complete
> mode for now but may be someone has better idea to make them work together?

I don't know how Evil handles Esc, but I had this problem, too. From
what I recall, it looked like auto-complete hijacked the Esc key for no
apparent reason in that context, so it should probably be solved at the
auto-complete side.

In any case, I solved/worked around it by adding an `ac-stop' binding
for Esc to `ac-completing-map', so now the first Esc stops the
completion, and another Esc exits Insert mode, which is just fine for my
purpose.

I.e., something like

  (define-key ac-completing-map [escape] 'ac-stop)

might fix it for you.

-- 
Štěpán



More information about the implementations-list mailing list