Opening a new line in evil-mode
Dima Gorbik
dmitry at gorbik.ru
Mon Jun 2 08:01:46 CEST 2014
Hello all,
Please take a look at the following piece of code:
(goto-char (point-max))
(insert "\n”)
In normal state of evil-mode goto-char moves the cursor to the end of line visually, but it points before the last symbol, not after. Although the example above works just fine — it works as if the cursor is pointing after the last symbol so the last symbol is not carried to the next line which is a correct behavior. I wonder how evil determines that it needs to insert after the last symbol, not before.
The reason I ask about this is because I am trying to understand why hitting enter in haskell-mode repl in normal state in evil-mode puts the last symbol of the current line on the next line. It looks like (insert "\n") is invoked in a callback and evil doesn't know that it needs to maintain the compatibility.
Thanks,
Dima
More information about the implementations-list
mailing list