Fork me on GitHub
#cursive
<
2018-10-02
>
royalaid00:10:39

Is there a way to move kv-pairs around via keybinding?

royalaid00:10:53

ideally up or down a row

cfleming08:10:42

@royalaid Yes, Edit-&gt;Structural Editing-&gt;Move form up/down will move paired forms if you’re at the start of one, like this: {:a 1 |:b 2 :c 3} where | is the caret.

👍 4
cfleming08:10:01

That also works for some other forms e.g. let bindings.

joelsanchez20:10:04

hello. suppose I want to edit some code in a dependency, and load it in the REPL. what's the way of doing this with Cursive?

joelsanchez20:10:03

since the code in dependencies is opened in a "read-only" way, I don't see an easy way of doing it

joelsanchez21:10:20

a way to do it is to go to Project settings -> Libraries, add the source folder as Sources, and delete the library from the list. that way the code is editable and can be loaded with "Send (...) to the REPL", and symbol resolution works as expected. a better way?

tanzoniteblack21:10:26

if you're using lein, you can also take advantage of "checkouts" to load the library as a module inside the project

tanzoniteblack21:10:33

but I haven't found a better way then that yet either

cfleming21:10:11

@joelsanchez No good solution for that sorry - workarounds that I can describe in the doc are very welcome.

cfleming21:10:40

If you’re using deps you can override your main dependency with a git one and do it that way.

joelsanchez22:10:11

thank you both. I will try checkouts, since I'm using lein

joelsanchez22:10:49

checkouts work just fine, if anyone is interested. just need to change the "refresh dirs" of tools.namespace. thanks