Fork me on GitHub
#spacemacs
<
2019-07-19
>
didibus06:07:01

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.

didibus06:07:05

Any solution to this?

ag06:07:29

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

didibus07:07:58

I'll pull latest develop and try

practicalli-johnny07:07:51

@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

practicalli-johnny07:07:29

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.

didibus07:07:03

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

didibus07:07:29

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

didibus07:07:46

as well as on the line after

didibus07:07:08

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

jumar08:07:12

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
practicalli-johnny09:07:54

@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?

practicalli-johnny09:07:21

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