From ed2fbb7f72d16d0e8b0a5d9fb92f9da5f001784b Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 31 Jul 2015 22:28:35 -0400 Subject: [PATCH] spacemacs layer: set evil-move-beyond-eol to t This variable allows to put the point behind the last character of a line in normal state. So now eval-last-sexp behaves as expected in elisp and all other languages. Note that this is not the default in Vim but it does not make a lot of sense to force this behavior in Emacs where eval-last-sexp is so important. Anyway it is easy to revert the behavior by setting this variable back to nil in dotspacemacs/config --- spacemacs/packages.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index f2b711762..a525b5875 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -570,6 +570,11 @@ ;; https://bitbucket.org/lyro/evil/issue/502/cursor-is-not-refreshed-in-some-cases (add-hook 'post-command-hook 'evil-refresh-cursor) + ;; allow the point to go past the end of line so we can + ;; consisently evaluate expression with eval-last-sexp in + ;; all modes + (setq evil-move-beyond-eol t) + (defun spacemacs/state-color-face (state) "Return the symbol of the face for the given STATE." (intern (format "spacemacs-%s-face" (symbol-name state))))