Fork me on GitHub
#cursive
<
2021-03-09
>
robert-stuttaford10:03:23

does Cursive support a gesture where by i move a form to a new let binding, in the closest (inner most parent) let form? similarly, is there a gesture for introducing and lifting let bindings further and further up? i.e. these from clj-refactor: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-introduce-let https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-move-to-let https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-expand-let

cfleming04:03:03

You can introduce a let using Extract Variable, however amazingly I don’t seem to have that documented. Refactor -&gt; Extract/Introduce -&gt; Variable. You first select the form you want to extract, then select the level you want to introduce the let at.

robert-stuttaford07:03:54

ok nice! i'll give it a whirl!

cfleming07:03:08

One thing I should also point out - if you extract to an existing let the binding will be added to that one as you’d expect.

robert-stuttaford12:03:14

does Cursive support form-wise selection? i know you can expand/contract, but say i had three forms in a row i wanted to select and then cut, without using the mouse or selecting lines (with shift-up/down-arrow) is this possible?

imre12:03:26

Here's a discussion about that. There are workarounds but it could be better https://github.com/cursive-ide/cursive/issues/997

robert-stuttaford13:03:17

yeah that sticky thing will drive me swiftly crazy 😂 seems like it's still on the roadmap

imre13:03:05

I use the sticky stuff, it gets the job done, but what I commented about still stands unfortunately

cfleming23:03:35

I actually look at this periodically, but it’s unfortunately still hard due to the discussed problems integrating it into IntelliJ’s expand/shrink selection. But I promise to look at it again in this EAP cycle.

imre13:03:25

Colin, is these any chance these would be addressed in the near future? Should I break it out into a separate issue? https://github.com/cursive-ide/cursive/issues/2097#issuecomment-776189685

cfleming23:03:31

I’ve filed this, and fixed it for the next EAP: https://github.com/cursive-ide/cursive/issues/2523