I originally (before this check-in) tried writing a regular expression snippet that matched cr+number and tried to generate placeholder text, but I couldn't work out how to embed the $n placeholders.

Using your code as a guide, I've come up with a cwp snippet that works nicely, letting users type the list of parameters first and generating the formatting string based on that.