Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

VSCode nested snippets (or include a snippet inside another snippet)

$
0
0

I'm wondering if I can refer to another snippet within a snippet in VSCode user defined snippet.

Say I have

"Test1": {
        "prefix": "snippet_test1",
        "body": 
            "something"
}

and is there a way to insert snippet_test1 in another snippet like

"Test2": {
        "prefix": "snippet_test2",
        "body": 
            "${1:snippet_test1}"
}

Now snippet_test2 just outputs snippet_test1 instead of the content of snippet_test1.


Viewing all articles
Browse latest Browse all 97371

Trending Articles