VSCode snippets

{
	// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
	// same ids are connected.
	// Example:
	// "Print to console": {
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }
	"Create for main": {
		"prefix": "ifmain",
		"body": [
			"if __name__ == '__main__':",
			"    $0"
		],
		"description": "Log output to console"
	},

	"Create Hile header": {
		"prefix": "header",
		"body": [
			"#!/usr/bin/env python",
            "# -*- encoding: utf-8 -*-",
			"# FileName : $TM_FILENAME",
			"# Author : ${1:Donghao}",
			"# CreateTime : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
			"# ModifyTime : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
			"# Description : $2",
		],
		"description": "I donnot Know"
	}
}

你可能感兴趣的:(python,vscode,ide,编辑器)