Skip to content

Instantly share code, notes, and snippets.

@lynaghk
Created June 3, 2015 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lynaghk/0b401411dd55d7af20d2 to your computer and use it in GitHub Desktop.
Save lynaghk/0b401411dd55d7af20d2 to your computer and use it in GitHub Desktop.
copy and eval form in cider buffer.
(defun cider-send-dwim (arg)
"Send the appropriate forms to the REPL to be evaluated."
(interactive "P")
(let ((expr (cider-last-sexp)))
(set-buffer (cider-current-repl-buffer))
(unless (eq (current-buffer) (window-buffer))
(pop-to-buffer (current-buffer) t))
(goto-char (point-max))
(insert expr)
(cider-repl-return)
(other-window 1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment