[
// 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": ["command+shift+r", "enter"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
{ "keys": ["alt+r", "enter"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
{ "keys": ["command+shift+r", "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": ["command + f7"], "command": "repl_transfer_current", "args": {"scope": "file"}},
{ "keys": ["command + f7", "r"], "command": "repl_transfer_current", "args": {"scope": "file", "action":"view_write"}},
// Executes line(s) of text in REPL terminal, latter only displays code and does not execute
{ "keys": ["command+alt+r"], "command": "repl_transfer_current", "args": {"scope": "lines"}},
{ "keys": ["command+alt+r", "r"], "command": "repl_transfer_current", "args": {"scope": "lines", "action":"view_write"}},
// Executes a block (e.g., a custom function) of text in REPL terminal, latter only displays code and does not execute
{ "keys": ["command+shift+alt+r"], "command": "repl_transfer_current", "args": {"scope": "block"}},
{ "keys": ["command+shift+alt+r", "r"], "command": "repl_transfer_current", "args": {"scope": "block", "action":"view_write"}}
]