template-string-converter icon indicating copy to clipboard operation
template-string-converter copied to clipboard

Allow using just `$`

Open Dimava opened this issue 1 year ago • 1 comments

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`

Dimava avatar Apr 29 '23 18:04 Dimava

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.

Ptujec avatar Jul 11 '23 09:07 Ptujec