Closed vnijs closed 9 years ago
Alternatively, is there a way to only activate sendtext only for a particular file type?
I think it would be possible to send to different programs based on the file type, or activate only for one type of file. If you want to take a stab at it, the API reference should be helpful: https://www.sublimetext.com/docs/3/api_reference.html
I used the section below in vim at somepoint and that work find to send code to the R-gui. So I tried adding something similar to sendtext (see below). However, it had no effect. Is there a way to have R-code (from an R or Rmd file) sent to the R-gui but code in an sh file sent to iterm?
let cmd = substitute(cmd, "\", '\', 'g') let cmd = substitute(cmd, '"', '\"', "g") let cmd = substitute(cmd, "'", "\'", "g") call system("osascript -e 'tell application \"R\" to cmd \"" .cmd. "\"'")