Live Template - use integer parameter to loop and generate code?

I am assuming this has been asked and answered before but I was unsuccessful finding it with search.

I would like to create a Live Template that would take in 1 integer parameter and then use that parameter in a loop within the template.

For example if I enter 1, the template would result in:

string.format("{0}", arg0);

and if I were to enter 4, the template would result in:

string.format("{0}{1}{2}{3}", arg0, arg1, arg2, arg3);

Is this possible and if so what would the template look like?

Thanks,
~james

1 comment
Comment actions Permalink

Unfortunately, this isn't possible with the current way Live Templates work, but it would make a nice addition. I've added a feature request: http://youtrack.jetbrains.com/issue/RSRP-404357

0

Please sign in to leave a comment.