【VScode】代码文件注释,User snippets 配置 Python/C++ , 其他语言类似

在代码文件头部,输入 header ,回车,自动生成文件注释

Python

{
	"HEADER": {
		"prefix": "header",
		"body": [
		  "# -*- encoding: utf-8 -*-",	
		  "\"\"\"",
		  "Date   : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
		  "Author : 你的名字",
		  "\"\"\"",
		  "",
		  "$0"
		],
	  }
}

C++

{
	"HEADER": {
		"prefix": "header",
		"body": [
		  "#pragma once",
		  "",
		  "///****************************************************************************",
		  "/// Date   : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
		  "/// Author : 你的名字",
		  "///****************************************************************************",
		  "",
		  "$0"
		],
	  }
}

效果

【VScode】代码文件注释,User snippets 配置 Python/C++ , 其他语言类似_第1张图片

你可能感兴趣的:(vscode,python,c++)