[TextMate] Snippet, Command, Macro and Language Suggestions

Jarkko Laine jarkko at jlaine.net
Fri Oct 8 09:28:46 UTC 2004


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.

//jarkko
--
Jarkko Laine
http://jlaine.net
http://divingfinn.blogspot.com




More information about the textmate mailing list