template-string-converter
template-string-converter copied to clipboard
Allow using just `$`
Compared to literal $
in strings I use ${}
much, much more
And I definetly never want to remove on the content when typing $
over a selection
I would like the extension to autocomplete {}
brackets for me when I write just $
s = `abcd|efg${123}h`
// type `$`
s = `abcd${|}efg${123}h`
// extended: also convert to template string
s = "abcd|efgh"
// type `$`
s = `abcd${|}efgh`
// selection: surround on $
s = "abc|def|gh"
// type `$`
s = `abc${|def|}gh`
I have a snippet that lets me complete $ to ${}.
"Template Literal": {
"prefix": "$TemplateLiteral",
"body": [
"\\${$1\\}"
],
"description": "Insert Template Literal"
}
Unfortunately when using it this extension does not work.