3

I'm attempting to set up SublimeText (Windows) to send R code to an open R REPL but failing. I know that R-Box is initialized somewhat properly because I can send code to the default R console.

The question is: How do I set up the config file to send the R code to the repl with [CTRL] + [Enter]

I'm assuming that this is an oversight on my part regarding the setup of the package, but there aren't any instructions I can find for initial setup for sending to REPL. What I have tried (BELOW) has been put together from other config files I've found on stack and around the web.

Here is my config file:

{
    // TRIED THIS
    // "prog" : "SublimeREPL",

    // TRIED THIS
    // "App" : "SublimeREPL",

    // path to Rgui.exe (for windows only)
    "R64" : "C:\\Program Files\\R\\R-3.2.3\\bin\\x64\\Rgui.exe",

    // path to Rscript binary
    // "rscript": "/usr/local/bin/rscript",

    // auto advance to the next line.
    "auto_advance" : true,

    // auto advance to the next non-empty line. Override to false if "auto_advance" is false.
    "auto_advance_non_empty": false,

    // enable auto completions
    "auto_completions": true,

    // enable status bar hint
    "status_bar_hint": true
}

I've also tried [CTRL] + [Shift] + [p], R-Box:Choose Program, SublimeREPL

edit 1:

GUI approach fails too Tools > SublimeREPL > Eval in REPL > Selection

Shortcut key and GUI approach fail for Python as well

ghonke
  • 321
  • 3
  • 15
  • The last `CTRL + Shift + p` option makes it work for me without changing anything else. If you want me to check what I've got for any particular settings, let me know. – alistaire Jan 28 '16 at 17:53
  • @alistaire, yes please do, your repl config would also be helpful if you're on windows and you don't mind – ghonke Jan 28 '16 at 18:19
  • In RBox user settings, I've got `"prog": "SublimeREPL"`. Besides that, pretty much everything is default. My SublimeREPL user settings do set a PATH variable to Anaconda, but if the REPL if functioning at all, I doubt that's the solution. – alistaire Jan 28 '16 at 18:23
  • Wait, I'm not on Windows. I'm not sure that changes much; if the REPL works by itself, your issue should be internal to SublimeText. – alistaire Jan 28 '16 at 18:31

1 Answers1

1

I managed to get it working by changing the user settings of the SendTextPlus package to:

    {
       "prog": "SublimeREPL",
    }

It seems the reason you have to change it in the SendTextPlus package settings instead of the R-Box package is that the send code functionality has been exported to SendTextPlus in the newest version. Hope this helps.

For reference: https://raw.githubusercontent.com/randy3k/R-Box/master/README.md

Zheli Wei
  • 11
  • 2
  • 1
    thanks for your effort, weirdly enough I did this and managed to get a ```setwd()``` command to evaluate in the REPL (although no text was transferred, just found out via ```getwd()```) but no additional commands will evaluate now – ghonke Apr 30 '16 at 17:47