Skip to content

Instantly share code, notes, and snippets.

@Hendekagon Hendekagon/copy2clip
Created May 19, 2017

Embed
What would you like to do?
copy2clip
(defn copy2clip [x]
(let [w (StringWriter.)]
(pprint x w)
(.. Toolkit getDefaultToolkit getSystemClipboard
(setContents (StringSelection. (.toString w)) nil))))
@Hendekagon

This comment has been minimized.

Copy link
Owner Author

Hendekagon commented May 19, 2017

image
add copy2clip to a namespace, then add the above command to Cursive's commands and give it a keyboard shortcut, then you can evaluate an expression in the editor and it will be copied so you can paste the result back into the editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.