Skip to content

Instantly share code, notes, and snippets.

@roman01la
Created December 26, 2017 03:15
Show Gist options
  • Save roman01la/d826e20cfccab2cd0a17baeed2f20f8d to your computer and use it in GitHub Desktop.
Save roman01la/d826e20cfccab2cd0a17baeed2f20f8d to your computer and use it in GitHub Desktop.
atom.commands.add 'atom-text-editor', 'repl:eval-selected-sexp-and-replace', ->
if editor = atom.workspace.getActiveTextEditor()
if selected = editor.getSelectedText()
protoRepl.executeCodeInNs(selected,
{resultHandler: (result) ->
console.log(result)
editor.insertText(result.value)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment