Fork me on GitHub

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?


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


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


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


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


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


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


yeah, I can't find such a feature


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