VS-Code用户代码片段 - 快捷生成代码
一.设置用户代码片段方法
1 - 首先打开VS-Code(Visual Studio Code)代码编辑器
2 - 找到设置图标并点击找到 - 用户代码片段 - 选项
3 - 点击图示对应选项
4 - 给你的专属代码片段起一个名字就可以开始编辑了
5 - 进来之后的样子,有一些参数也不难理解,都有注释
一.本人一些常用的代码片段(注:每个文件只能生成一个代码片段)
------把原有的全部删除,替换成下面的------
----------------------For循环(var声明方式)---------------------------
//for循环
//在js标签或者js文件中输入 - fori - 即可快捷生成代码片段
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for