Create snippet Visual Studio Code (ok)

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

Go to File --> Preferences --> User Snippets. Select your preferred language.
Now type the following code to make a for loop snippet:
  "Create for loop":{
    "prefix": "for",
    "body":[
      "for(int i = 0; i < 10; i++)",
      "{",
      "   //code goes here",
      "}"
    ],
   "description": "Creates a for loop"
  }

Last updated