[TextMate] Snippet, Command, Macro and Language Suggestions

Justin French justin.french at indent.com.au
Sat Oct 9 14:44:13 UTC 2004


On 08/10/2004, at 7:28 PM, Jarkko Laine wrote:

> On 8.10.2004, at 05:05, Justin French wrote:
>>
>> It only works when you have text selected, otherwise, yes, it does 
>> the whole file... I'll see if we can do a check for a selected text.
>
> Justin,
>
> One quick fix would be to add alt-w to the beginning of the macro. If 
> there is a selection at hand, the command doesn't do anything (so the 
> selection keeps intact), but if there's no selection, it selects the 
> word you were typing. I think this is the behavior you'd want in 99% 
> of the cases and at least you'd get rid of the "select the whole file" 
> bug.
>
> I've used the trick in all of my macros (that it suits) and have had 
> no problems with it.

Duly noted, and it's in 1.0.1 whenever that gets released :)

Justin




More information about the textmate mailing list