[TxMt] Skip snippet autocompletion

Juan Carlos Anorga juananorga at gmail.com
Sun Jul 31 18:48:15 UTC 2005


Allan, it might be nice then to be able embed placeholders. So we  
could do things like:

<img src="$1"${2: alt="$3"}${4: class="$5"} />

so to get:
<img src="img.jpg" class="thumb" />

you would type:
img<tab>img.jpg<tab><delete><tab><tab>thumb<tab>


- Juan


On Jul 31, 2005, at 1:27 AM, Allan Odgaard wrote:

> On 31/07/2005, at 10.06, Andreas Wahlin wrote:
>
>
>> Let's say I write img<tab> and then I get the img tag with three  
>> attributes to fill in, let's say I want to skip the class  
>> attribute, how do I do that?
>>
>
> Not possible -- if you often skip it, I'd suggest removing it from  
> the snippet (IMHO many of the HTML snippets carry too many  
> attributes). If you skip it 50% of the time, you could change the  
> snippet into this:
>
>    <img src="$1" alt="$2"${3: class=""} />
>
> That way, when you leave the alt-attribute, you can either do  
> delete + tab to remove and leave snippet, or do arrow right + arrow  
> left to get caret in between the quotes. That's currently the best  
> way to deal with optional arguments in snippets.
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>




More information about the textmate mailing list