On 07.12.2008, at 13:30, Simon Strandgaard wrote:
On Sat, Dec 6, 2008 at 11:19 AM, Hans-Jörg Bibiko bibiko@eva.mpg.de wrote:
For HOME one could do this:
a tmcommand bound to HOME, no input, output to show tool tip, command:
if [ $TM_COLUMN_NUMBER -eq 1 ]; then open "txmt://open?line=1" & else open "txmt://open?line=$TM_LINE_NUMBER&column=1" & fi
This looks promising. I have tried it out, but it behaves a bit odd. When I first tried experimenting with it your snippet jumps to the start of the document. Then I began writing this reply and wanted to double check.. and I inserted your snippet again, but now it does nothing.
First it is not a snippet in TM terms. It must be a command. Then, what's odd?
The command checks if your cursor is at the beginning of a line: TM_COULUMN_NUMBER==1? If so it moves the cursor to the beginning of the doc. If not it moves the cursor to first column of the current line.
if its possible to go to an X,Y position without modifying the document..
This is done by using 'open txmt://open?line=X&column=Y'. This command tells TM to activate the front most doc and set the cursor to X,Y without modifying the doc.
Normally I do not use the HOME key. I usually navigate by using APPLE +ARROW_LEFT/UP
--Hans
Attached my command.