In the development process, it is a good habit to write comments casually. Only by re-reading the code after a few years can you quickly understand the function of a function and improve the readability of the code. The following is the koroFileHeader
installation and use of vscode. Record it here
1. Search and install koroFileHeader
2. Open the configuration item
Access method 1:
Access method 2:
3. Search for fileheader in setting, open the configuration item Cursor Mode
4. Add configuration items
See github for more configuration options
"fileheader.cursorMode": {
// 函数配置项
"description": "", // 功能描述
"param": "", // 传入参数
"return": "", // 返回结果
},
5. Use
After writing the function, use shortcut keys in the function name ctrl+win+t
to generate a function description template and add relevant function content
If you do not want to generate header comments, you can configure as follows
6. Effect
When calling this function, move the mouse to the function name, and the relevant function description will be displayed