文件
—首选项
—配置用户代码片段
,输入python
,点击回车,打开python.json
。添加如下内容:
{
"HEADER":{
"prefix": "header",
"body": [
"#!/usr/bin/env python",
"# -*- encoding: utf-8 -*-",
"'''",
"@File : $TM_FILENAME",
"@Time : $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
"@Author : python",
"@Version : 1.0",
"@Contact : python@qq.com",
"@License : (C)Copyright 2017-2018, Liugroup-NLPR-CASIA",
"@Desc : None",
"'''",
"",
"# here put the import lib",
"$0"
],
}
}
使用
新建python文件,输入header
回车就会自动生成文件头。
网友评论