简体   繁体   English

是否有可能更改 JavaScript 的智能?

[英]Is there a possibility to change intllisence for JavaScript?

Hello there I was wondering if there is a way you can change the auto complete in visual studio code of for loop in JavaScript to be more like the auto complete in c++.您好,我想知道是否有一种方法可以将 JavaScript 中for循环的 Visual Studio 代码中的自动完成更改为更像 c++ 中的自动完成。 From:从:

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

to:至:

for (let i = 0; i < count; i++)
{
  /* code */
}

Thank you in advance.先感谢您。

I ended up using Bulent and rioV8 answers and create my own snippet我最终使用了 Bulent 和 rioV8 的答案并创建了我自己的代码片段

"for loop": {
    "prefix": "for_Loop",
    "body": [
        "for(var ${1:i} = ${2:0}; i < ${3:10}; i++) {",
        "\t$4",
        "}"
    ],
    "description": "for loop"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM