Sublime Forum

ST2 Snippets - Nesting fields

#1

Hi All,
I am having some issues with nesting fields.
I have used the method described here: viewtopic.php?f=2&t=7858&p=40197&hilit=snippets+multiple+values#p33061 to have multiple options for a field:

class = ${4:Accessory/Controller/COnventional/DALI/LED/Media/MIrror/Spot/Wash}${4/(a$)|(c$)|(co$)|(d$)|(l$)|(m$)|(mi$)|(s$)|(w$)|.*/?1:ccessory:?2:ontroller:?3:nventional:?4:ali:?5:ed:?6:edia:?7:rror:?8:pot:?9:ash/i}

For LED I want to nest the same inside the option with a line break so that it would end up like below:

[quote]class = led
shape = ${5:shape}[/quote]

I thought I would be able to do this:

class = ${4:Accessory/Controller/COnventional/DALI/LED/Media/MIrror/Spot/Wash}${4/(a$)|(c$)|(co$)|(d$)|(l$)|(m$)|(mi$)|(s$)|(w$)|.*/?1:ccessory:?2:ontroller:?3:nventional:?4:ali:?5:ed\nshape = ${5:shape}:?6:edia:?7:rror:?8:pot:?9:ash/i}

but this causes ST to crash. Is there a way to do this or is this beyond the capabilities of a snippet

Thanks in advance

0 Likes