如何将TextMate中的选定文本(或行)发送到在终端上运行的R.

Nai*_*iqi 6 terminal textmate r

我刚开始在终端上使用R,因为它的标签功能.但我不知道如何将TextMate中的选定文本发送到终端.专业知识可以告诉我如何在TextMate中编写命令吗?

谢谢!

Joh*_*lby 9

这是我目前使用的确切TextMate命令.希望能帮助到你!

rawText="$(cat | sed 's/ / /g;')" 

osascript  -e 'on run(theCode)' \
           -e '  tell application "Terminal"' \
           -e '    do script theCode in window 1' \
           -e '  end tell' \
           -e 'end run' -- "$rawText"

open "txmt://open?line=$(($TM_LINE_NUMBER+1))&column=1000000" &
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述