Closed Islam0mar closed 3 years ago
Mostly looks good.
Your description says the keybinding is C-c C-e
, but your code says C-x C-e
. I prefer C-c C-e
for consistency with the other bindings.
That was a typo. I use C-x C-e to match with slime and elisp, but I would change it.
I ended up renaming your function to julia-snail-send-dwim
for consistency with other names and to keep it shorter. Also, I refactored it to use existing functions for DRYness. That changed the behavior to evaluate code in the case of an active region or block, rather than just copy it into the REPL, but I think that's more desirable in most cases anyway, since it preserves module context.
Thanks for your contribution!
I was using ess, and they have
ess-eval-region-or-function-or-paragraph-and-step
which is much simpler for one key-bind. This PR would add:julia-snail-eval-region-or-block-or-line
binds to"C-c C-e"