How can I send selected text (or a line) in TextMate to R running on Terminal

后端 未结 2 1960
悲&欢浪女
悲&欢浪女 2020-12-30 14:12

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 wri

2条回答
  •  遥遥无期
    2020-12-30 15:16

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

    enter image description here

提交回复
热议问题