Skip to content

Instantly share code, notes, and snippets.

@tomschenkjr
Created June 5, 2012 17:20
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tomschenkjr/2876337 to your computer and use it in GitHub Desktop.
Send a selection of code to R using SublimeREPL and move cursor to new line
// Purpose: This is a macro which will send a selection of text to sublimeREPL.
// Note: Add this to your macros, which can be accessed from Tools > Macros or saving to your Sublime Text Packages folder.
[
{"command": "repl_transfer_current", "args": {"scope": "selection"}}
{"command": "move", "args": {"by": "lines", "forward": true}}
]
// Purpose: This will execute the sent-to-R-new-line.sublime-macro file, which will send a selection of text through sublimeREPL and add a new line.
// Note: Add this to your user keybindings (Preferences > Key Bindings - User)
{ "keys": ["ctrl+alt+r", "down"], "command": "runMacroFile", "args": {"file": "path-to-macro-file-you-saved-here/sent-to-R-new-line.sublime-macro"}},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment