1

(setq a "3")

If I want to evaluate the line, I'd go to the end of line and do (eval-last-sexp) But in evil mode, the last sexp is "3" not the expression.

I can go to the next line and execute the command, but wonder if there's other way

  • edit

So this is.. very hard problem

https://github.com/syl20bnr/spacemacs/issues/2525

  • edit 2

spacemacs seems to handle it by artificially moving eol at the time of evaluation

https://github.com/syl20bnr/spacemacs/blob/dffa67a7e1f4b9c16f4a9397c7c468d2fe7a975f/layers/%2Blang/common-lisp/funcs.el#L4

although this doesn't solve going back by sexp as commented in the issue, it solves the elisp evaluation problem.

I ended up enabling the evil-move-byond-eol because of the backward-sexp and such. what is the most annoying thing setting the eol value?

4
  • If you're in Spacemacs, you can try spacemacs/eval-current-form-sp. It's bound to , e c.
    – g-gundam
    Aug 27, 2023 at 15:16
  • 1
    You could check out the variable evil-move-beyond-eol. However, although it is a little annoying, personally I just switch to insert state with A before doing the eval-last-sexp (or use @g-gundam's suggestion, well C-M-x without Spacemacs, whenever possible). Aug 27, 2023 at 19:05
  • edited the op. thank you for the answers
    – eugene
    Aug 27, 2023 at 23:50
  • I ended up enabling the evil-move-byond-eol because of the backward-sexp and such. what is the most annoying thing setting the eol value?
    – eugene
    Aug 27, 2023 at 23:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.