[TxMt] Re: command to renumber snippet tabs?
Timothy Bates
timothy.c.bates at gmail.com
Mon Aug 11 19:35:32 UTC 2008
so here's a first attempt at a script to rewrite snippet
${1:placeholders}
It works on multi-line snippets, and handles renumbering the paired $n
tokens to match the new number of their master
Let me know what you think. When writing snippets you can use random
distinct 1 or two digit numbers in your numbering, or (if you don't
yet have matching slave elements, then just ${n:
The command will clean up the numbering, so you are free to reorder
and nest snippets tokens.
tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: re-number snippet 2.tmCommand
Type: application/octet-stream
Size: 2372 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080811/0fd3c23b/attachment.tmCommand>
-------------- next part --------------
On 11 Aug 2008, at 9:41 AM, Timothy Bates wrote:
> ${n:not sure${n:about} the ${n:order) ${n:yet ${n:but that no longer
> matters}}
> -->
> ${1:not sure${2:about} the ${3:order) ${4:yet ${5:but that no longer
> matters}}
>
> ${1:not sure${2:about} the ${3:order) ${n:oops, added this!} ${4:yet
> ${5:but that no longer matters}}
> -->
> ${1:not sure${2:about} the ${3:order) ${4:oops, added this!} ${5:yet
> ${6:but that no longer matters}}
More information about the textmate
mailing list