Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save felixlindemann/6230200 to your computer and use it in GitHub Desktop.
Save felixlindemann/6230200 to your computer and use it in GitHub Desktop.
Sublime-Repl-R-friendly-Keysettings
[
// 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/
// original Version: https://gist.github.com/tomschenkjr/2790415#file-r-friendly-keybindings-sublime-keymap
// Executes a selection of text in REPL, latter only displays code and does not execute
{ "keys": ["super+shift+r"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
{ "keys": ["super+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": ["super+alt+shift+r"], "command": "repl_transfer_current", "args": {"scope": "file"}},
{ "keys": ["super+alt+shift+r", "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": ["ctrl+alt+r"], "command": "repl_transfer_current", "args": {"scope": "lines"}},
{ "keys": ["ctrl+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": ["ctrl+shift+alt+r"], "command": "repl_transfer_current", "args": {"scope": "block"}},
{ "keys": ["ctrl+shift+alt+r", "r"], "command": "repl_transfer_current", "args": {"scope": "block", "action":"view_write"}}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment