Home Download Buy Blog Forum Support

Help with snippet substitution

Help with snippet substitution

Postby Beezer on Mon Mar 25, 2013 12:29 pm

I'm trying to write a 'tagging' snippet to tag each line in the selection, and place them all in a containing tag.

{
"keys": ["ctrl+alt+b"],
"command": "insert_snippet",
"args": {
"contents": "<container>\n${SELECTION/.*/\t<item>$MATCH<item>/g}\n</container>"
}
}

It's not working too well!!! It doesn't seem to be matching each line, and I'm also not sure how to add the / to the closing li.

Can anyone help me out? thanks.
Beezer
 
Posts: 3
Joined: Fri Feb 22, 2013 1:26 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 11 guests