Okay, this is driving my crazy. I had set this up before, deleted Sublime Text, and now I can\'t remember what the right configuration was.
Very simple: I\'m running R
I resolved this by adding the location of Rterm.exe to PATH
Go to Preferences -> Browse Packages...
and create a directory tree User/SublimeREPL/config/R
. In that directory, create a new file named Main.sublime-menu
with the following contents:
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "r",
"id": "SublimeREPL",
"children":
[
{"command": "repl_open",
"caption": "Rterm",
"id": "repl_r",
"mnemonic": "r",
"args": {
"type": "subprocess",
"external_id": "r",
"additional_scopes": ["tex.latex.knitr"],
"encoding": {"windows": "$win_cmd_encoding"},
"soft_quit": "\nquit(save=\"no\")\n",
"cmd": {"windows": ["C:/Program Files/R/R-3.0.2/bin/x64/Rterm.exe", "--ess", "--encoding=$win_cmd_encoding"]},
"cwd": "$file_path",
"extend_env": {"windows": {"PATH": "{PATH}:/C/Program Files/R/R-3.0.2/bin"}},
"cmd_postfix": "\n",
"suppress_echo": {"windows": false},
"syntax": "Packages/R/R.tmLanguage"
}
}
]
}]
}
]
Save the file, and you should now have a Tools -> SublimeREPL -> Rterm
menu option. Double-check that the path is the correct one to the Rterm.exe
file. On my computer (32-bit XP) it's in the i386
subfolder of bin
, so yours may be in bin/x64
or something like that.
I hope this helps, let me know if you still have issues.