如何将 TextMate 中选定的文本(或一行)发送到在终端上运行的 R [英] How can I send selected text (or a line) in TextMate to R running on Terminal

查看:26
本文介绍了如何将 TextMate 中选定的文本(或一行)发送到在终端上运行的 R的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I just started using R on Terminal because its tab function. But I have no idea how to send the selected text in TextMate to the Terminal. Could expertise show me how to write the Command in TextMate?

谢谢!

推荐答案

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

Here is the exact TextMate command that I currently use. Hope it helps!

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" &

这篇关于如何将 TextMate 中选定的文本(或一行)发送到在终端上运行的 R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆