Skip to content

Instantly share code, notes, and snippets.

@kjhealy
Created November 5, 2012 16:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjhealy/4018089 to your computer and use it in GitHub Desktop.
Save kjhealy/4018089 to your computer and use it in GitHub Desktop.
R and ST2's REPL. Keybinding Example
[
// Modified Sublime-REPL keybindings for an "R-friendly" set of shortcuts.
// Copy and paste this text into the Key Bindings - User (under Preferences menu).
// For more information, see http://tomschenkjr.net/2012/05/17/using-sublime-text-2-for-r/
// Executes a selection of text in REPL, latter only displays code and does not execute
{ "keys": ["super+shift+enter"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
// I disabled this one
//{ "keys": ["super+shift+enter", "r"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}},
// Executes the entire file (build) in REPL, latter only displays code and does not execute
{ "keys": ["super + f7"], "command": "repl_transfer_current", "args": {"scope": "file"}},
{ "keys": ["super + f7", "r"], "command": "repl_transfer_current", "args": {"scope": "file", "action":"view_write"}}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment