1、/** 内容 */ 一直想知道这注释怎么做到的,今天查阅资料,原来是这么回事
在没有输入注释内容的情况下,输入/** 会自动 /** */中间输入注释的内容,换行会自动在前面带星
/**
* open: true浏览器是否自动打开,不写默认false,true自动打开
*/
2、vscode 在插件中查询插件koroFileHeader
安装
(1)文件-》首选项-》设置 搜索fileheader
(2)、在settings.json配置内容
"fileheader.customMade": { // 头部注释
"Author": "gfl",
"Date": "Do not edit",
"LastEditors": "gfl",
"LastEditTime": "Do not edit",
"Description": "file content",
"FilePath": "Do not edit" // 增加此项配置即可
},
"fileheader.cursorMode": { // 函数注释
"description": "",
"param": "params",
"return": ""
},
"fileheader.configObj": {
"autoAdd": true, // 默认开启自动添加头部注释,当文件没有设置头部注释时保存会自动添加
"autoAlready": true, // 默认开启
"prohibitAutoAdd": [
"json",
"md"
], // 禁止.json .md文件,自动添加头部注释
"wideSame": false, // 设置为true开启
"wideNum": 13 // 字段长度 默认为13
}