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
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}}