How to add custom code snippets in VSCode? - Stack Overflow

PHOTO EMBED

Sun Dec 20 2020 11:27:54 GMT+0000 (UTC)

Saved by @harivilasp2 #c++

"For Loop": {
    "prefix": "for",
    "body": [
        "for (var ${index} = 0; ${index} < ${array}.length; ${index}++) {",
        "\tvar ${element} = ${array}[${index}];",
        "\t$0",
        "}"
    ],
    "description": "For Loop"
},
content_copyCOPY

going in visual code shift+ctrl+p and user snippets and then selecting language

https://stackoverflow.com/questions/29995863/how-to-add-custom-code-snippets-in-vscode