pycharm 修改新建文件时的头部模板

  默认为__author__='...'    [省略号是默认你的计算机名]

修改这个作者名的步骤:

  依次点击:File->Settings->Editor->File and Code Templete

  点击右侧Templates选项卡,会有一些格式文件新建时的模板

  在这里可以修改这些默认模板

以修改Python Script为例:

默认为:

__author__ = '$USER'

把 '$USER' 换成你想要的作者名,也可以直接将这一句删掉,新建python file时,就会是空白文件

也可以换成别的变量,或其他代码:

1.Plain text.
2.#parse
  -- directives to work with includes.
3.Predefined variables to be expanded into corresponding values in the format ${<variable_name>}.
The available predefined file template variables are: ${PROJECT_NAME} - the name of the current project.
${NAME} - the name of the new file which you specify in the New File dialog box during the file creation.
${USER} - the login name of the current user.
${DATE} - the current system date.
${TIME} - the current system time.
${YEAR} - the current year.
${MONTH} - the current month.
${DAY} - the current day of the month.
${HOUR} - the current hour.
${MINUTE} - the current minute.
${PRODUCT_NAME} - the name of the IDE in which the file will be created.
${MONTH_NAME_SHORT} - the first 3 letters of the month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL} - full name of a month. Example: January, February, etc.

4.Custom variables. Their names can be defined right in the template through the #set directive or will be defined during the file creation.
To have the dollar character ($) in a variable rendered "as is", use the ${DS} variable instead. This variable evaluates to a plain dollar character ($). 点击查看原文

pycharm 修改新建文件时的头部模板(默认为__author__='...')的更多相关文章

  1. pycharm 修改新建文件时的头部模板

    pycharm 修改新建文件时的头部模板 默认为__author__='...' [省略号是默认你的计算机名] 修改这个作者名的步骤: 依次点击:File->Settings->Edito ...

  2. Pycharm创建py文件时自定义头部模板

    File->settings->Editor->File and Code Templates->Python Script #!/usr/bin/env python # - ...

  3. 【转】Pycharm创建py文件时自定义头部模板

    File->settings->Editor->File and Code Templates->Python Script #!/usr/bin/env python # - ...

  4. 《转》Pycharm创建py文件时自定义头部模板

    File->settings->Editor->File and Code Templates->Python Script #!/usr/bin/env python # - ...

  5. PyCharm编辑HTML文件时输入{%不能自动补全

    在PyCharm编辑HTML文件时输入Django模板语言时,发现录入 {% 不能自动补全. 找了一下,发现 setting 里可以设置 Python Template Languages,选择自己使 ...

  6. [QualityCenter]设置工作流脚本-新建缺陷时描述字段模板设置

    需求:实现新建缺陷时,描述模板自动生成填写模板. 在脚本编辑器找到Defects_Bug_New函数,然后填写以下代码: Sub Defects_Bug_New    On Error Resume ...

  7. vimrc配置-新建文件时自动生成文件头

    vimrc配置-新建文件时自动生成文件头    auto add file header autocmd BufNewFile *.py 0r /home/zxkletters/.vim/vim_te ...

  8. Pycharm新建文件时自动添加基础信息

    位置:File->settings->Editor->File and Code Templates->Python Script 添加以下代码: #!/usr/bin/env ...

  9. PyCharm 新建文件时默认添加作者时间等

    将内容添加到Python Script 右侧的文本框中: 路径: File → Setting → Editor → File and Code Templates → Python Script # ...

随机推荐

  1. DOM对象和JQuery对象进行转换

    var btn=document.getElementById("btn"); $(btn).click(function(){}); DOM对象转换为JQuery对象: 用$符号 ...

  2. xtrabackup数据库备份

    xtrabackup备份 一.Xtrabackup概述 1.1.简介 Xtrabackup是一个对InnoDB做数据备份的工具,支持在线热备份(备份时不影响数据读写),是商业备份工具InnoDB Ho ...

  3. Ubuntu 开启SSH 以及LAMP环境安装

    1. 更新 apt-get sudo apt-get update 2.安装 openssh sudo apt-get install openssh-server 3.设置root账号密码 sudo ...

  4. [Programming WCF Services]Chapter 1. WCF Essentials - EndPoint

    1.配置文件方式设置EndPoint(ABC) 1.1.基本配置 <system.serviceModel> <services> <service name=" ...

  5. [FTP]xferlog日志解析

    [root@teacher ~]# cat /var/log/xferlogMon Jan 25 20:41:39 2016 1 10.0.222.156 913268 /sys/sys64/Pack ...

  6. sencha cmd常用命令汇总

    一.sencha generate:自动生成项目或者代码 1.sencha generate app 项目名称 生成路径 :生成一个新的extjs项目 注明:以上命令会从官网下载试用版本的ext代码到 ...

  7. photoshop如何快速切图

    作为业余爱好,之前都是用比较笨的方法切图,甚至用裁剪工具一张一张的切. 后来知道用切片工具,但也仅限于互不重叠的图片. 在工作中实际使用时才发现实在是太慢了,慢到上级自己说你不用做了,我来吧. 其实, ...

  8. 部署项目时遇到的问题---IIS7.X配置ASP.NET MVC4

    1.安装.NET Frameword4.0框架.如果先装IIS后装4.0框架的话,要在IIS注册4.0框架.具体方法见下图 .NET框架版本请根据操作系统版本自行选择.注册完后,在“ISAPI和CGI ...

  9. html&&css 基础知识笔记

    diV有 Class.Style.title.ID 等属性. 1.margin 空出边缘 margin:上 下 左 右(按顺时针顺序,缺少某一方向则对称) 2.border 边框(三要素:像素 形状 ...

  10. iOS + UIWebView 实践

    1. 调用java script 现在只能实现弹出窗口 [self.m_webView stringByEvaluatingJavaScriptFromString:@"alert(1)&q ...