Open clyfe opened 3 years ago
the closing parens is ergonomically on the next line, to work easily with the last form.
Not to say this shouldn't work in Calva, but just curious what your reasons are for saying this. I find that since alt+enter
evaluates the top level form within the comment (in Calva), that there's no issue working with the last form being on the same line as the closing paren. Maybe your workflow is different and/or I am missing something(s), though.
You don't always want to evaluate all that's in the comment block, it may not all be pure functional, you may want to cherry pick because order, or side effects.
From en evaluation point of view the placement of that last paren doesn't matter at all, though. Can you describe in a bit more detail what ”work easily with the last form” means?
Just to clarify, if you put your cursor anywhere inside the (dabble)
form in your example, and run "Evaluate top level form" (alt+enter
by default), it will only evaluate (dabble)
, even if you had other forms inside the comment
form. This is how Calva makes working inside comment forms easier.
I guess I'm used to moving to the end of a form and "eval last form". I pretty much never use "eval top level". I use "eval file" and "eval last form" ("current" I believe in calva parlance).
Current Form goes beyond parlance, actually. You can also place the cursor before the opening paren and use the command. (Even if it seems to be unnecessary work to move the cursor around and evaluate something that you can just alt+enter
instead.)
When writing a comment, the closing parens is ergonomically on the next line, to work easily with the last form. Reformatting moves it up. In Clover there's a trick with a comma, that keeps the parens in it's place. It would be nice if that would work with Calva.