1、安裝插件KoroFileHeader
2、設置
在vscode左下角點擊設置按鈕,選擇“設置”,然后輸入“fileheader”,
- 文件頭部注釋:Fileheader:custom Made
- 函數注釋:Fileheader:cursor Mode
隨便點擊哪個"在setting.json"中編輯,輸入以下設置后保存,然后重啟vscode更新設置:
// 文件頭部注釋
"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":""
}
3、使用
(1)文件頭部注釋
- 快捷鍵:crtl+alt+i(window),ctrl+cmd+t (mac)
- 生成樣式如下:
(2)函數注釋
- 快捷鍵:ctrl+alt+t (window), ctrl+alt+t(mac)
- 函數注釋不一定生成在頭部,自己把控
- 生成樣式如下:
本文出處:
https://www.cnblogs.com/suRimn/p/10450372.html
在此非常感謝@
sueRimn






