[TxMt] html snippets, why the selected text part?

Charilaos Skiadas skiadas at math.uchicago.edu
Sat May 21 20:28:12 UTC 2005


In the HMTL bundle, and in the XHTML bundle as well, there are snippets 
like this:

<h1>${1:`echo $TM_SELECTED_TEXT`}$0</h1>

activated via a tab trigger, "h1" in this case. I am completely missing 
the point here. Why is the echo command there? How can there possibly 
be a selected text when activating through a tab trigger?
The way it is right now, if I type  h1, press tab, type my heading, and 
press tab again, the heading is selected. Was that the intended 
behavior? If so, could someone give me an example of how this is 
usefull? I haven't played much with html, so I might just be missing 
something obvious here.
If this is not the intended behavior, should we change all those 
snippets to simply <h1>${1:heading}</h1>$0, or <h1>$0</h1> ? Are these 
snippets redundant in the presence of Ctrl-space, and if so would it 
make sense to have them have a slightly richer outcome, like <h1 
class"$1">...   ?

Ok, enough questions for now,
Haris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 989 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20050521/1396cf14/attachment.bin>


More information about the textmate mailing list