[TxMt] Newbie HTML question

Allan Odgaard throw-away-1 at macromates.com
Thu Nov 16 10:05:13 UTC 2006


On 15. Nov 2006, at 21:41, Scott Jenson wrote:

> However, can't I do something clever with the thousands of commands  
> hidden in this cool app?
>
> For example: 1) Select enclosing tags  2) remove tags 3) wrap  
> selection in open/close tag?
>
> I believe that 2 and 3 already exist. Is there any way to do #1,  
> select enclosing tags?  That seems useful for all sorts of uses  
> beyond just this particular case.

You could make a command which takes document as stdin and outputs a  
snippet with the things properly setup -- but it would have a slight  
performance cost for transforming the entire document. We’re (most  
likely) going to markup start/end tags in the grammar to make it  
easier to do commands that take “current scope” as input, although  
some things here have not been worked out yet (how to select the  
inner-most scope when there are nested elements using the same scope  
name).




More information about the textmate mailing list