/Enhanced-R

R tools / plugin / package for Sublime Text 2/3

Primary LanguagePython

Enhanced-R package for Sublime Text 2/3

This package helps in writing R languages:

  • More comprehensive Indentation and Syntax
  • Send commands to different applications such as R GUI, Terminal and SublimeREPL.
  • Show function hint in status bar


Supported Applications

  • R GUI on Windows and Mac
  • Terminal and iTerm 2 on Mac
  • Tmux and screen on Linux
  • SublimeREPL

Note: For Windows, AutoHotkey which is an automation script is used as a bridge between R and ST.


Key bindings

Sending Code (default: R)

Keybinding: C-Enter

  • Send the selection to R (See settings for choosing default application)
  • If no syntax is selected, it sends the whole line where the cursor stays at.
  • Or if the current line ends with {, it finds the matching } and sends the whole block.

Changing Working Directory

Keybinding: C-\

  • Change working directory to where the current working script is located

Sourcing file

Keybinding: C-b

  • Tell R to source the working script

Settings

Preferences -> Package Settings -> Enhanced R -> Settings

Application

  • R Application Switch in Command Palette to switch between applications.

Application paths

  • In default, Enhanced R will automatically search for applications. You may manually edit applications' paths.

Auto advance lines after sending command

{
    // auto advance lines after sending command
    "r_auto_advance": false
}    

Auto completions

{
    "r_auto_completions": false
}    

Packages for function hints.

{
    // a list of packages which functions will show in the status bar
    // "default_pkgs": ["base", "graphics", "grDevices", "methods", "stats", "utils"]
}