[TxMt] A few problems with inserting text via a Command ???

Mats Persson mats at imediatec.co.uk
Fri Feb 11 11:47:56 UTC 2005


I have a number of Commands to insert some text into the document, but 
all of them have a couple of 'side-effects' that I don't want.

1.	The inserted text is always selected, and I would prefer it to not 
be selected.

2.	There is always a New line character behind the input, whereas I 
would just want the cursor to remain immediately behind the inserted 
text on the same line.

What is it that I'm missing or doing wrong ?? Any help would be 
gratefully received.

Command Examples:

INSERT DATE:
Save: Nothing
Command: 	echo `date +%Y-%m-%d`
Input: None
Output: Tried all versions ( Insert as Snippet / Replace Selected text  
/ etc )

INSERT PATH2FILE:
Save: Nothing
Command: 	echo $TM_FILEPATH | sed 
"s|^$TM_USER_ROOT_DIRECTORY\(.*\)\$|\1|"
Input: None
Output: Tried all versions ( Insert as Snippet / Replace Selected text  
/ etc )


Kind regards,

Mats

----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -




More information about the textmate mailing list