Using Sublime Text as R editor


Hi all,

I’ve been using Sublime Text for writing R scripts and sending the code lines straight to R console. A few days ago the “send” command stopped working (although the Sublime window is still keeping the R colour syntax). I tried to re-install the packages that link Sublime and R but strangely they aren’t showing up in the packages list.
I’m wondering if this had happened to someone else before that knows a solution for this.



Hi Osmar,

I recently re-installed Sublime Text 3 and I installed two packages: R-Box and SendCode. I believe by default these packages send anything with .R extension to the terminal. (I.e., I don’t remember changing any settings, and it works great.)

The instructions I followed are here:

I hope this helps,


Hey Josh and Osmar,

I installed “Send Text” as well as “R Box”, how to I actually send the code to R now? I read that all the nice features in R Studio, such as auto-completion, can be still used in Sublime, is that true? Is there a chance that you guys show me how to set up the combination of R+Sublime?




Hi Rene. To activate the R syntax in your text file you have to save the file with the .R extension. Then you will note the letters will change colours accordingly to the R syntax. Highlight the line and press command-return (I use mac, pc may be different) to send that line of code to the R console.
The auto-completion is just one of the great features of sublime, in my opinion the options for multiple selection and replace many characters at the same time is the most useful one.



Hi Rene,
I just hit Command-Enter to send to Terminal, same as for RStudio. But I know you can change this in the preferences. For instance, the keys you hit as well as where to send it (e.g., if you want to send to the actual R app, rather than the Terminal).
(I’m on a Mac.)


I don’t get it…saving it as .R so that it switches the syntax worked just fine…but sending the expression to R is not really working. Anyone of you at uni?


Hi Rene, I had a similar issue. If you google it you will find suggestions to uninstall and install again R-box, SendText and SendCode that would work.
What worked for me though is another package: SublimeREPL
Follow this tutorial:
I hope it works. Sorry for not help you hands on but I’m not at Macquarie anymore.



HA!! Got it:-) There was and error in my package control installation that was transported over and over again when I reinstalled the whole text editor. I am using SendCode+R Box+SublimeREPL now. Let’s see if this is “better” than R Studio…

I like R Studio but I am just curious to try something else.

Thanks for your help and fast responses.




I’m having the same problems. Could you share what exactly the error was in your package control installation?


Hey Matthew,

I can’t tell you why the installation of (REPL I guess) went wrong in first place but I figured that I could not completely uninstall Sublime because some options, e.g. packages, were saved in a folder within my home directory. Try to figure out where Sublime stores the packages on your machine and then delete the whole folder manually after uninstalling Sublime. Then reinstall and open the console in Sublime before installing packages so you can see if the installation of any package was successful…

Hope that helps…let me know if not:-)