Date: Fri, 17 Jan 2014 16:08:36 +0700 From: "Allan Odgaard"mailinglist@textmate.org To: "TextMate users"textmate@lists.macromates.com Subject: [TxMt] Re: when sending code to R.app textmate 1 and 2 both Message-ID:3D9202F3-4409-4616-8C91-022E216F188A@textmate.org Content-Type: text/plain; charset=utf-8; format=flowed
On 17 Jan 2014, at 11:13, Kevin Owens wrote:
[?] I think it may be related to the lines in that command like
"open"txmt://open?line="
Yes, that would go to whatever version of TextMate is responsible for handling the txmt URL scheme.
The bundle should call ?mate? instead.
For 2.0 you can use:
"${TM_MATE}" -l ?line?:?column?
For a version that should work with both, use:
"${TM_MATE:-$TM_SUPPORT_PATH/bin/mate}" -l ?line?
If you can confirm this works, we can update the bundle accordingly.
______
I can confirm that this works. Here's the meat of what i changed:
if [ "$TM_LINE_NUMBER" != "" ]; then open "${TM_MATE:-$TM_SUPPORT_PATH/bin/mate} -l ?line?&column=1000000" & elif [[ $TM_SELECTION =~ [1-9][0-9]*:?[0-9]*-([1-9][0-9]*):?[0-9]* ]]; then # Regular Selection open "txmt://open?line=$((${BASH_REMATCH[1]}+1))&column=1000000" & elif [[ $TM_SELECTION =~ [1-9][0-9]*:?[0-9]*x([1-9][0-9]*):?[0-9]* ]]; then # Block (option) selection open "txmt://open?line=$((${BASH_REMATCH[1]}+1))&column=1000000" & else open "txmt://open" fi