darksoulsong
darksoulsong

Reputation: 15319

vscode snippets: repeat what's being typed into given location on the snippet body

I want to know if I can repeat whats being typed on position $1 into the snippet location shown below:

"BootstrapCol": {
        "prefix": "BSCol",
        "body": [
            "<div class="col-$1">$0</div><!-- ./col-{REPEAT WHAT IS BEING TYPED HERE} -->"
        ],
        "description": "Create a Bootstrap Grid col Markup"
    }

If so, how?

Upvotes: 0

Views: 285

Answers (1)

Alex
Alex

Reputation: 67591

"<div class=\"col-${1}\">$0</div><!-- ./col-${1} -->"

Upvotes: 2

Related Questions