I have installed and customized emmet(zen coding) with support for java script snippets in snippets.json folder for sublime, so that i could expand abbreviations. it works and for expands properly from these definitions
"js":
{
"abbreviations": {
"em": "emmet"
},
"snippets": {
"forn": "for(i=0;i<${id};i++)\n{\n\t\n}",
"for": "for (var ${class} = 0; i < ${id}; ${class}++) {\n\t|}"
}
}
So far so good Now what i wanted is when i use
for>len/=N> in input panel to embed some code inside the for loop.
i expect
for(var i=0; i<N; i++){
len/=N
}
But what ever i type it gets embedded in HTML tag following the for loop .
how do i mix snippets and user defined variables after the loop not inside the loop. ** similarly i want similar syntax (text*5+=cars) that may expand to this kind of pattern
text += cars[0] + "<br>";
text += cars[1] + "<br>";
text += cars[2] + "<br>";
text += cars[3] + "<br>";
text += cars[4] + "<br>";
text += cars[5] + "<br>";