Works! Brilliant.
Ross
On 05/03/2014 11:29, "Hans-Jörg Bibiko" bibiko@eva.mpg.de wrote:
oops, sorry, much more easier ;)
Create a new tmCommand with:
#!/usr/bin/env bash [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
Rcmd="length($TM_SELECTED_TEXT)"
osascript <<-APPLESCRIPT tell application "R" to cmd "${Rcmd//"/"}" APPLESCRIPT
Input: Selection; format: Text Output: Discard Key Equivalent: "whatever you like"
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate