Fork me on GitHub

I have an issue where when I do , e e to run cider-eval-last-sexp, when I'm in normal mode, with the cursor on the last param, it doesn't run that sexp, but instead the last form inside it. It is because it seems cider wants the cursor to be one more to the right, except normal mode doesn't allow you to put the cursor there.


Any solution to this?


what about , e v? afaik it’s only available in develop though


I'll pull latest develop and try


@didibus Use , e e on the next line down from your expression, this is the simplest possible approach (press j first and 0 if the next line contains code and you are not at the start of the line) Or you can use , e f to evaluate from the top level of the current sexp / form from anywhere inside the sexp


You can also use , e ; anywhere in an expression to evaluate from the top level of the current sexp/form and give the answer as a comment rather that a temporary display.


Oh, I see, its a bit annoying, would be nice if cider used the sexp under point


Espcially since in emacs-lisp mode, , e e with cursor over the ending parens evaluates the sexp


as well as on the line after


I wonder what makes it not work in Clojure, is it clojure-mode, spacemacs or cider ?


I think I configured spacemacs to allow to move beyond the last character because of this... @didibus It should be the evil-move-beyond-eol var

👍 4

@didibus seems odd to me if in eLisp major mode that , e e would evaluate the current expression when its the last and the previous expression in all other cases. How would you ever evaluate the last but one expression without adding a space?


The function is evaluating the last expression and not the current one, otherwise the function should be renamed