![How vscode automatically generates function comments](https://img.php.cn/upload/article/000/000/041/5e17efbceb2ed102.jpg)
1. Install the plug-in KoroFileHeader
![1578627218547114.png How vscode automatically generates function comments](https://img.php.cn/upload/image/614/466/727/1578627218547114.png)
##2. Open the settings
![1578627245532567.png How vscode automatically generates function comments](https://img.php.cn/upload/image/447/524/369/1578627245532567.png)
Click the settings button in the lower left corner of vscode, select "Settings", and then enter "fileheader"
![1578627265397680.png How vscode automatically generates function comments](https://img.php.cn/upload/image/679/623/211/1578627265397680.png)
File header comments: 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:
![1578627290389898.png How vscode automatically generates function comments](https://img.php.cn/upload/image/429/549/231/1578627290389898.png)
3. Use
(1) File header comment
Shortcut keys: crtl alt i (window), ctrl cmd t (mac)
Generate style As follows:
![1578627321768475.png How vscode automatically generates function comments](https://img.php.cn/upload/image/276/754/904/1578627321768475.png)
(2) Function comment
Shortcut keys: ctrl alt t (window), ctrl alt t (mac)
Function comments are not necessarily generated in the header. You can control them yourself
The generated style is as follows:
![1578627337597272.png How vscode automatically generates function comments](https://img.php.cn/upload/image/466/259/906/1578627337597272.png)
Recommended related articles and tutorials:
vscode tutorial
The above is the detailed content of How vscode automatically generates function comments. For more information, please follow other related articles on the PHP Chinese website!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn