karthik / Rtools

Sublime text package for R
33 stars 11 forks source link

improved send selection command, code cleaning #1

Closed jlegewie closed 12 years ago

jlegewie commented 12 years ago

Hi,

it's great to see someone pick this up (I made the original post in the ST2 forum). Thanks!

Here are a couple of improvements:

1) different way to determine whether the code is r. The previous version relied on the file ending, which required the user to save the file first. This version uses the ST2 language definition (what you see in the bottom right corner) so that you can already send selection before the file is saved.

2) slightly improved code for calling osascript. E.g. the reactivation of ST2 is now integrated in the main subprocess call and works much more reliable.

3) Code cleaning based on a python linter. That's why the whole file is different. Let me if that bothers you and I will send a separate pull request without the linting. I am using the package SublimeLinter, which works pretty well for Python.

I have some suggestions for additional features and might make some more contribution (but I am pretty busy right now). Should I open tickets on github or do you prefer a different channel...

karthik commented 12 years ago

This is great, thanks! Tickets on github would be the best way to go.