activePane = atom.workspaceView.getActivePaneView() atom.project.open().then (editor) -> activePane.splitDown(editor)
cmd-k r keyboard shortcut. In all three cases, it will run the selected text or the whole document if nothing is selected.
For me, this package changed the way I work Atom packages (and probablycorey’s coffee-eval, mentioned below). Now I keep a CoffeeScript scratch pad file open at all times to try things out and I’m always selecting and running things like
atom.workspace.getActivePaneItem() to make sure it returns what I expect it to.
This packaged started out as a fork of probablycorey’s coffee-eval but I felt like I wanted to make enough changes that it justified creating a new package. The same development process can be accomplished using Coffee-Eval, so definitely check that out too if you’re interested in developing packages this way.
Hope others find it useful, thanks!