1. Frank Fischer
  2. evil
  3. Issues
Issue #106 resolved

Switching to emacs mode moves point back one character

created an issue

Suppose we are in evil-insert-state; | indicates position of the cursor.


Running evil-emacs-state will move the cursor to


I think the text insertion point should remain invariant with respect to insert vs emacs state changes. The current behavior is inconvenient when emacs state is programmatically used in conjunction with the normal state; in this scenario, open above/open below commands result in the cursor being one character off from the correct indentation.

Comments (4)

  1. dnquark reporter

    Upon further investigation, I believe this behavior is fixed by setting

      (setq evil-move-cursor-back nil)

    so I'm going to mark this as resolved. This should go on the list of possible "gotchas" for emacs users, if such a list exists :)

  2. Frank Fischer repo owner
    • changed status to new

    There is no such list till now (I think), but perhaps you could add a section to Evil's page at EmacsWiki? I have to admit that I almost never use Emacs-state (I have no reason to do so, insert-state is almost equivalent) so there may be many quirks with it.

  3. Log in to comment