Skip to content

Instantly share code, notes, and snippets.

@jmacias
Forked from roman01la/init.coffee
Created January 3, 2018 18:27
Show Gist options
  • Save jmacias/5eeac84e78a9dc9eae8688a5ce7ea98d to your computer and use it in GitHub Desktop.
Save jmacias/5eeac84e78a9dc9eae8688a5ce7ea98d 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