[TextMate] Snippets, and Selected Text

Ian Phillips ianp at ianp.org
Thu Oct 7 07:59:07 UTC 2004


>> For a snippet, there should be a variable say "$s" that references 
>> the text selected when the snippet was acted on, so that say, if I 
>> select noel at noeljackson.com and click on my href snippet, it will 
>> replace $s with noel at noeljackson.com, allowing easy creation of 
>> headers etc in HTML without going back, or creating macros.
>
> Agreed, a selected text variable is a must. I hope we can get this 
> high on the version 1.2 list please

Surely a better solution would be to allow any variables in snippets, 
just like you can with templates, that way you could just use 
$TM_SELECTED_TEXT to get this.

Ian.

#ifndef  __COMMON_SENSE__ | Ian Phillips
#include <std_disclaimer> | http://ianp.org
#endif




More information about the textmate mailing list