1

When I do for (tab) I would like VS code to just set up a regular for loop for me to fill out but instead it prints out this monster

for (let index = 0; index < array.length; index++) {
    const element = array[index];
}

Anybody know a way to change this so it just prints out the simple for(i= ;i< ; i++); ?

  • You probably need extensions in VS code. I dont know if there is any. – Allart Sep 26 '20 at 13:13
  • 1
    This post talks about editing the javascript code completion snippets but you can infer from these how to get to and edit the VB snippets. https://stackoverflow.com/questions/40110541/how-to-edit-existing-vs-code-snippets – Drew Sep 26 '20 at 13:14
  • Have you ever tried to use a *[for of loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of)*? Try changing your code: ```for (const element of array) {...}```. The syntax as you can see is less verbose :) – Carlo Corradini Sep 26 '20 at 13:29

0 Answers0