1. Install the plug-in KoroFileHeader
2. Open the file => Preferences => Settings => setting.json and enter the following:
// 用于一个文件的头部注释
"fileheader.customMade": {
"Author": "dcl",
"Date": "Do not edit", // 文件创建时间(不变)
"LastEditors": "dcl", // 文件最后编辑者
"LastEditTime": "Do not edit", // 文件最后编辑时间
"Description": "",
"param": "",
"return": ""
},
// 用于函数
"fileheader.cursorMode": {
"Author":"dcl",
"description": "",
"param": "",
"return":""
},
Shortcut keys generate header comments: window: ctrl+alt+i mac: ctrl+cmd+i
Shortcut keys generate function comments: window: ctrl+alt+t mac: ctrl+cmd+t
3. If the shortcut keys conflict and do not take effect:
Open the file => Preferences => Keyboard Shortcuts and search to see if there is a conflict.
The command to find the header comment shortcut keys is fileheader
. The command to find the function comment shortcut keys is cursorTip.