It's possible to create a placeholder inside a python interpolation block?.
I want to do a snippet for my grammar exercises. I'm currently in this snippet.
snippet "ej(ercicio)?( (\d+))?" "Ejercicios - grammar" br
${1:unidad}.${2:ejercicio} )$0`!p
num = match.group(3) if match.group(2) is not None else 2
for var in range(2, int(num)+1):
→ snip += str(var) + " -> $"+str(var + 1)`
endsnippet
But it outputs
ej 8<tab>
unidad.ejercicio )¬
2 -> $3¬
3 -> $4¬
4 -> $5¬
5 -> $6¬
6 -> $7¬
7 -> $8¬
8 -> $9¬
(the first it's always an example, so i don't print it)
Any clue?