[TxMt] Repeating tabstops in snippet

Rod Knowlton rod.knowlton at gmail.com
Mon Oct 23 20:05:25 UTC 2006


On Oct 23, 2006, at 12:22 PM, Andrew Henson wrote:

>
> <select>
>  <option value="$1">$2</option>
> opt$0
> </select>
>
> Then create a second snippet like this:
>
> <option value="$1">$2</option>
> opt$0
>

> The only caveat to this is that when you've added all your options,  
> you'll have to manually delete out the last opt tab trigger word.   
> I don't think there's any way around this but is not a major  
> issue.  I'll happily be told if there's a better way!

If you change both of the 'opt$0' lines to:

${3:opt}$0

You add two tab keystrokes to continuation (easy repetition) and gain  
the ability to simply delete the already selected 'opt' after you've  
added your final option.

- Rod





More information about the textmate mailing list