textmate / r.tmbundle

TextMate support for R
25 stars 9 forks source link

Returning to current line in "R.app & Step" does not work #5

Closed gabrakadabra closed 10 years ago

gabrakadabra commented 12 years ago

The last line

open "txmt://open?line=$(($TM_LINE_NUMBER+1))&column=1000000" &

is not working. It looks like TM_LINE_NUMBER does not return a line number as I always return from R on line 1. Any suggestions?

Bibiko commented 12 years ago

On Aug 24, 2012, at 11:26 AM, gabrakadabra wrote:

The last line

open "txmt://open?line=$(($TM_LINE_NUMBER+1))&column=1000000" &

is not working. It looks like TM_LINE_NUMBER does not return a line number as I always return from R on line 1. Any suggestions?

Which version of TextMate/Mac OSX do you're using?

This bug was recently fixed. With TM 2.0 (9289) it works fine on 10.7.4.

Cheers, --Hans

gabrakadabra commented 12 years ago

Hi. Thank you for your quick response.

Which version of TextMate/Mac OSX do you're using?

10.8.1 and TM 2.0 (9289)

I'm using the bundle included in text mate.

/Gabriel

gabrakadabra commented 12 years ago

The command works fine for sending one line but fails to return to (the last line +1) when I use the command on a selection.

/Gabriel

statuser commented 10 years ago

Bump. I'm seeing the same issue as Gabriel on OS X 1.8.5 and TextMate 2.0-alpha.9495. It looks like TM_LINE_NUMBER Does not return a line number when multiple lines are selected.

infininight commented 10 years ago

Correct, as there are multiple lines there is no way to return a specific line so TextMate won't even set that variable. This would also be the case with multiple cursors. The best work-around would be to use TM_SELECTION as a fallback in this case, this returns a lot of info but all you would need to extract is the first line mentioned to get a good idea of what line to link to. (You can see the syntax in TextMate help → Selection String Syntax.)