[TxMt] Repeating tabstops in snippet
Ed Singleton
singletoned at gmail.com
Tue Oct 24 09:15:37 UTC 2006
On 23/10/06, Andrew Henson <elaptics at googlemail.com> wrote:
> Hi Ed,
>
> Actually that's pretty easy to do.
>
> Create your first snippet like so, assigning the tab trigger to
> whatever phrase you like:
>
> <select>
> <option value="$1">$2</option>
> opt$0
> </select>
>
> Then create a second snippet like this:
>
> <option value="$1">$2</option>
> opt$0
>
> I have assigned this snippet to a tab trigger of opt. If you call
> yours something different, you need to change the opt reference in
> the two snippets. When you use the first snippet, you'll tab through
> the two values, then tab to the end of "opt", press tab again, which
> triggers the opt tab trigger. The same will happen in the second
> snippet. 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!
That's genius! One of those things that's so simple, you know you
should have been able to work out by yourself, but it always seems I
don't.
Thanks for that.
Ed
More information about the textmate
mailing list