Evil: Insert mode RET behaving weirdly in SML-mode and Haskell-mode
Frank Fischer
frank.fischer at mathematik.tu-chemnitz.de
Tue Oct 4 11:35:36 CEST 2011
On Mon, Oct 03, 2011 at 11:26:26PM +0200, Sarah Brofeldt wrote:
> I don't know how to diagnose this properly sadly since the evil-ret motion confuses me, but in Haskell mode and SML-mode and probably others, return behaves oddly with respect to the indentation level you would expect, i.e. the one you would get by switching to Emacs state. Does anyone have an idea how to fix this?
In my opinion it is not a good idea to bind "RET" to `evil-ret' in
insert mode. The reason is that many modes may have their own
implementation of some return-key-magic, so at least, `evil-ret'
should preserve the default binding in insert-mode (in addition to its
own magic).
For the short term (until we decide what to do) you can do two things:
1. customize `evil-auto-indent' (set to nil) to prevent automatic indentation, if this is you problem.
2. unbind `evil-ret' in insert-state, e.g, (define-key evil-insert-state-map (kbd "RET") nil)
Anyway, you're right, having a binding like `evil-ret' active in
insert-mode without taking care of any other binding is probably a bad
idea. Thanks for pointing this out.
Frank
More information about the implementations-list
mailing list