安装插件korofileheader
打开设置
在vscode左下角点击设置按钮,选择“设置”,然后输入“fileheader”
文件头部注释:fileheader:custom made
点击在setting.json中编辑,输入以下设置后保存,然后重启vscode更新设置
// 文件头部注释 "fileheader.custommade": { "descripttion":"", "version":"", "author":"suerimn", "date":"do not edit", "lasteditors":"suerimn", "lastedittime":"do not edit" },
使用快捷键:crtl+alt+i(window),ctrl+cmd+t (mac)
生成样式如图:
相关文章教程推荐:vscode教程
以上就是vscode怎么自动添加头部注释的详细内容。