I am modding the TextMate package, although I'm a complete newbie to Ruby. The problem I'm trying to solve is to move the carriage to a specific position after the team has reached its conclusion.
Basically, what happens: I click on a key combo that launches a command to filter through a document and inserts text into the appropriate places, and then exits with replacing the document with new filtered text.
What I want to do next is that the carriage will return to where it was originally. I was very happy when I found the TextMate.go_to function, but I can only partially work it out. Function:
positionY = ENV ['TM_LINE_NUMBER']
positionX = ENV ['TM_LINE_INDEX']
...
TextMate.go_to: line => positionY,: column => positionX; #column no worky
I can get the caret in the correct row, but the column parameter is not working. I tried to shift them and even execute the function with only the column parameter, but no luck. I also tried with a hard-coded integer, but the positionX parameter prints the correct line index, so I doubt that there is anything there.
This is the only documentation I found on this method, but I looked at textmate.rb and it seems to my unprepared eyes that I am using it correctly.
, , , .
, , " ", , , , " ".
-?