snippet icon indicating copy to clipboard operation
snippet copied to clipboard

Variables

Open seanonthenet opened this issue 5 years ago • 7 comments

This is awesome... does it support variables ($1, $2...) like regular snippets?

seanonthenet avatar Sep 23 '20 13:09 seanonthenet

Hi @Spark3000

Unfortunately not, It's something that i've looked into but not been able to figure out.

Will let you know if anything changes.

devon2018 avatar Oct 30 '20 01:10 devon2018

@devon2018 I believe that if your extension stored parameters using the same syntax as the original VSCODE, it would also be able to implement the use of for tab stops variables.

///////SNIPPETS Devon Ray

{
    "created": "2020-10-25T10:46:18.187Z",
    "name": "CUSTOM_NAME_SNIPPET",
    "tags": [
        "TAGS_NAME"
    ],
    "content": "CODEX INSERT - $1......",
    "contentType": "php"
}

///////SNIPPETS vscode ORIGINAL

"CUSTOM_NAME_SNIPPET": {

	"prefix": "TRIGGER_NAME",
	"body": [
		"CODEX INSERT - $1 (VARIABLE for tab stops)
		$2, $3",
	],
	"description": "DESCRIPTION SNIPPETS"
}

DIFFERENT:

"content" vs "body" :FOR CODEX "name": vs : : FOR NAME SNIPPETS

Nickyg001 avatar Oct 30 '20 14:10 Nickyg001

This one feature is the one thing missing for this extension to be perfect.

HZSamir avatar Nov 11 '20 11:11 HZSamir

Any news on this? It would indeed make this extension perfect!

S-n-d avatar Aug 24 '21 09:08 S-n-d

lol i find out it doesn't support the variable

zhyyyq avatar Mar 01 '22 06:03 zhyyyq

Love the editor, hate that you can use variables. Can't you parse the snippet from selection or from the editor to and from a proper vscode snippet file? There's one called "Snippet Creator" by Wware Consulting that does this. Perhaps there's something to see there:

https://github.com/abulka/vscode-snippet-creator

transcendr avatar May 17 '22 09:05 transcendr

variables are a dealbreaker for me and thats really annoying because this is fantastic work! :(

verikono avatar Dec 24 '22 05:12 verikono