![How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/article/000/000/041/5dea16264920d224.jpg)
1. Install the plug-in KoroFileHeader
![1575622247283472.png How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/image/260/542/369/1575622247283472.png)
##2. Settings
![1575622263547897.png How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/image/662/754/975/1575622263547897.png)
Click the settings button in the lower left corner of vscode, select "Settings", and then enter "fileheader"
![1575622286373254.png How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/image/562/325/272/1575622286373254.png)
File header comment: Fileheader:custom Made
Function comment :Fileheader:cursor Mode
Click on any "edit in setting.json", enter the following settings and save, then restart vscode to update the settings
![1575622307206779.png How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/image/945/131/859/1575622307206779.png)
// 文件头部注释
"fileheader.customMade": {
"Descripttion":"",
"version":"",
"Author":"sueRimn",
"Date":"Do not edit",
"LastEditors":"sueRimn",
"LastEditTime":"Do not Edit"
},
//函数注释
"fileheader.cursorMode": {
"name":"",
"test":"test font",
"msg":"",
"param":"",
"return":""
}
Copy after login
3. Use
(1) file header comment
shortcut key: crtl alt i (window)
ctrl cmd t (mac) to generate the style as follows:
![1575622346548073.png How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/image/362/793/843/1575622346548073.png)
(2) Function comments
Shortcut keys: ctrl alt t (window),
ctrl alt t (mac) function comments may not be generated In the head, control the
generated style as follows:
![1575622388825235.png How vscode automatically generates function comments and file header comments](https://img.php.cn/upload/image/565/835/277/1575622388825235.png)
Recommended related article tutorials:
vscode tutorial
The above is the detailed content of How vscode automatically generates function comments and file header comments. For more information, please follow other related articles on the PHP Chinese website!