[TxMt] Re: R send function to console

Ross Ahmed rossahmed at googlemail.com
Wed Mar 5 12:33:47 UTC 2014


Works! Brilliant.

Ross

On 05/03/2014 11:29, "Hans-Jörg Bibiko" <bibiko at 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 at lists.macromates.com
>http://lists.macromates.com/listinfo/textmate




More information about the textmate mailing list