[TxMt] Bug in XML Bundle

Allan Odgaard allan at macromates.com
Sun Apr 10 16:37:20 UTC 2005


On Apr 10, 2005, at 18:22, Robert M.Zigweid wrote:

> Actually it may be just a misconception on my part, but the problem 
> is, when I activate the snippet with <-tab, the general flow for me is 
> to type in the snippet name, and then the attributes, then tab to get 
> at the Text Node portion of the tag.  The problem is that the 
> attributes show up in the closing tag too.  I'm not sure if this is 
> fixable or not based upon the way that snippets work.  But it sure 
> would be convenient if the attributes didn't show up in the closing 
> tag too.

Not really fixable ATM. You could change the snippet to: <$1 
$2>$0</$1>. You'd then need to tab to the arguments part rather than 
use space. I do plan in the future to allow something like 
/s/ptrn/replacement/ to be added to the mirror (e.g. 
“<$1>$0</${1/s/(\w+*).*/$1/}>”), so that instead of an exact mirror, 
one can do a regex-replace on the text entered. This would then also 
allow for snippets where e.g. getter and setter methods use different 
case for the attribute name (as in obj-c/cocoa).




More information about the textmate mailing list