因为笔者用的是苹果电脑,所以只讲ios系统怎么操作,windows系统应该也是差不多的。
1、打开vsc
2、安装插件auto-header
3、按com+shift+p输入setting进入设置
4、复制这段代码进去
5、
"autoHeader": {
"format": {
"startWith": "/**",
"middleWith": "*",
"endWith": "*/",
"headerPrefix": "@",
},
"header": {
"Author": "your name",
"Create Time": {
"type": "createTime",
"format": "YYYY-MM-DD HH:mm:ss",
},
"Modified by": {
"type": "modifier",
"value": "Your name",
},
"Modified time": {
"type": "modifyTime",
"format": "YYYY-MM-DD HH:mm:ss"
},
"Description": "",
}
}
6、上面那个就是模版,保存之后任意文件按com+control+i就出来了