Fork me on GitHub
#cursive
<
2017-12-30
>
jrheard18:12:56

is there a button i can press that evaluates the current form in the REPL, and then sends the result back to the editor window?

jrheard18:12:08

i’m missing the vocabulary to describe this but it seems like common functionality, i think i’ve seen emacs people do it

jrheard18:12:29

like, i want to write (+ 2 2) in my editor, put the cursor in there, press some keybind, and then have the (+ 2 2) go away and be replaced by 4

jrheard18:12:50

right now i can accomplish this with copy/paste from the repl window, but it can get hairy if i have a big data structure, and i feel like this is probably a solved problem

echristopherson23:12:46

@jrheard the action is called "Send top form to REPL"

echristopherson23:12:11

on a Mac it's Cmd+Shift+P; so I'm guessing on other platforms it's Ctrl+Shift+P

jrheard23:12:58

hm, i’m on a mac and for me, that command does indeed cause (+ 2 2) to execute in the REPL - but i’m saying that i’d like to have the (+ 2 2) in my editor window be replaced with the resulting 4, and i don’t believe that this command does that

echristopherson23:12:23

yeah, I can't find such a feature

jrheard23:12:58

oh well - i find myself reaching for something like this about once every month or two, but that isn’t really all that often in the grand scheme of things