Search code examples
visual-studio-codecode-snippetsvscode-snippets

Creating a stop in snippet "string"


I got this snippet and trying to create the next stop inside of the options. So first I select the type of, lets say I select v-if="NEXT-SHOULD-BE-HERE". How can I do that?

"Select template": {
    "prefix": ["templatetype"],
    "body": [
        "<template ${1|#:,v-if=\"\",v-for=\"\"|}>",
        "  ${2}",
        "</template>"
    ],
    "description": "Create a template and select type"
}

Solution

  • I don't think it is possible to put a tabstop inside a choice item. The grammar shows only text is available in a choice:

    choice ::= '${' int '|' text (',' text)* '|}'

    Also this issue appears to be about what you are asking and it has been closed:

    https://github.com/Microsoft/vscode/issues/35779