For example I want to reuse this transform like a variable in my snippet instead of write the transform again and again
${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/}
"example": {
"prefix": "example",
"body": [
"${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/} ${1:name1} = _${1};",
"${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/} ${2:name2} = _${2};",
"${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/} ${3:name3} = _${3};",
//...
],
"description": "example"
},
You can repeat the same transform by assigning it to a placeholder and referencing that number, like this:
"example": {
"prefix": "example",
"body": [
"${4:${TM_FILENAME_BASE/(.*)$/${1:/pascalcase}/}} ${1:name1} = _${1};",
"${4} ${2:name2} = _${2};",
"${4} ${3:name3} = _${3};",
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With