在VSCode的settings里搜索Custom Made,然后在settings.json文件中添加如下代码

// 以下为新添加
"fileheader.customMade": { //此为头部注释
    "Version": "1.0",
    "Autor": "myname",
    "Date": "Do not edit",
    "LastEditors": "myname",
    "LastEditTime": "Do not edit"
},
"fileheader.cursorMode": { //此为函数注释
    "param": "",
    "return": "",
    "author": "myname",
},
"fileheader.configObj": {
    "autoAdd": true, // 默认开启自动添加头部注释,当文件没有设置头部注释时保存会自动添加
    "autoAlready": true, // 默认开启
    "prohibitAutoAdd": [
        "json",
        "md"
    ], // 禁止.json .md文件,自动添加头部注释
    "wideSame": false, // 设置为true开启
    "wideNum": 13 // 字段长度 默认为13
}

添加后如下图

【VSCode】koroFileHeader插件自动添加文件及函数注释

 

 2、使用

文件头注释自动生成(ctrl+alt+i)

【VSCode】koroFileHeader插件自动添加文件及函数注释

 函数注释自动生成(ctrl+alt+t)

【VSCode】koroFileHeader插件自动添加文件及函数注释

 

相关文章:

  • 2022-12-23
  • 2023-01-17
  • 2022-12-23
  • 2023-03-21
  • 2021-04-22
  • 2021-07-14
  • 2022-12-23
猜你喜欢
  • 2021-07-14
  • 2021-09-08
  • 2021-09-12
  • 2022-12-23
相关资源
相似解决方案