I recently made the switch from TextMate2 to SublimeText2 and I am really impressed with the editor so far. That said, I am still trying to get some of the functionality I had in TextMate in SublimeText2. I am going to outline two of the things I am trying to accomplish below with the hope that somebody can give me some advice.

1) I would like to be able to "sweave, typeset and view" a .Rnw file in the same way that I can in TextMate. The idea is that I can type cmd + R (cmd + B in ST2) and the R chunks are sent to R, sweaved, and then placed into a .tex file. That file is then compiled and SKIM is called to open the corresponding PDF file. My understanding is that I need to create a custom build in ST2 to do this. This is what I have so far:

Basically I am calling R, setting the working directory, and sweaving the .Rnw file. This part works fine. The .tex file is created and can be compiled if opened in ST2 independently. What I cannot do is make this build compile the .tex file after it is created. The second half of the code (from "target": "make_pdf", to the end) is copied from the LaTeX build. So any insight on how I can get this to work would be great. Now on to problem 2.

2) I would like to be able to use the Rconsole in one window and have my .R file in the other. I would like to build the .R file and have it sent to the R console in the first window. RIght now I am able to build the .R file, but the R.app is opened and the output is shown there, not in ST2. Any insight on how I could get this to work would also be appreciated. Thank you in advance.

Yes, I do. In fact, what I am trying to accomplish relies on SublimeREPL. I see it as the next logical step in order to bring the functionality of R in sublime text up to par with Textmate or R Studio.

Cool. I have just started to work on this, as well. I am more interested in 1st scenario you describe, as I don't think I'll be moving totally away from RStudio all that soon. But yes, writing/editing/compiling .Rnw in ST2 will be a great feature.

I've put what I've done so far on Github. Please feel free to take a look and help out. I thought a lot more people would be wanting this type of functionality. Hopefully somebody who knows more than I do will be able to contribute.