利用vscode代码片段,设置文件头(fileheader)信息

1.新建一个代码片段文件
选择File -> Preferences -> User Snippets
选择代码片段类型,此处为New Global Snippets file
选中后,确认新建一个文件
2.设置fileheader的代码片段(json格式)

"File Header Comments": {
	//"scope": "javascript,typescript",
	"prefix": "fileheader",
	"body": [
		"/**",
		" * ${1:Undocumented}",
		" * @author: username",
		" * @email: [email protected]",
		" * @date: ${CURRENT_YEAR}/${CURRENT_MONTH}/${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}",
		" */"
	],
	"description": "File Header Comments"
}

你可能感兴趣的:(工具)