Hi, I am trying add a command to the R bundle that will send the current line to the R GUI, in the same way the ESS for Emacs "Eval line & step" command works. It is quite easy to send the line to R GUI, but I cannot find a good way to move to the cursor to the next line in TextMate. Currently I am using this Applescript to do the job: # move the cursor osascript -e 'tell application "System Events"' \ -e 'tell application "TextMate" to activate' \ -e 'tell process "TextMate"' \ -e 'keystroke (ASCII character 31)' \ -e 'end tell' \ -e 'end tell'
But the problem is that when you call the command using a keyboard shortcut ie. cmd+shift + R and keep holding cmd+shift for some time (I have this of a habit unfortunately :) ) the keystroke will be cmd +shift + (ASCII character 31) causing the text from the cursor to the end of the document to be selected.
Is there a smarter way to advance the cursor one line? -- maybe an internal TextMate command?
Thanks in advance. with best regards, Tobias Pyndt Steinmann