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. rsync+inotify实现数据的实时备份

    一.rsync概述 1.1.rsync的优点与不足 rsync与传统的cp.tar备份方式相比,rsync具有安全性高.备份迅速.支持增量备份等优点,通过rsync可以解决对实时性要求不高的数据备份需 ...

  2. ACM录 之 常识和错误。

    接下来说说一些ACM里面的常识和错误...(可能会比较乱) —— 首先ACM里面的代码都是要提交上去,然后让计算机自动判题的,所以...千万不要把 system("pause"); ...

  3. 制作双击可运行的jar

    http://www.cnblogs.com/ylawrence3/archive/2009/11/08/1350645.html

  4. keil c51的内部RAM(idata)动态内存管理程序(转)

    源:keil c51的内部RAM(idata)动态内存管理程序 程序比较简单,但感觉比较有意思,个人认为有一定应用价值,希望大家有更好的思路和方法,互相促进. 程序的基本思路是:在CPU堆栈指针SP以 ...

  5. svn switch 的用法

    switch用于在同一个版本库内不同分支之间的切换relocate用于版本库访问地址变更时,重新定位版本库 比如,由于SVN服务器更换到另一台主机上,这是SVN服务器的地址改变了,那么各客户端就无法连 ...

  6. Classification of text documents: using a MLComp dataset

    注:原文代码链接http://scikit-learn.org/stable/auto_examples/text/mlcomp_sparse_document_classification.html ...

  7. 解决phpcms V9缩略图模糊的方法

    解决V9缩略图模糊/libs/classes/image.class.php注释掉else   imagecopyresized($thumbimg, $srcimg, 0, 0, $psrc_x,  ...

  8. 有趣的keil MDK细节(转)

    源:有趣的keil MDK细节 1.MDK中的char类型的取值范围是? 在MDK中,默认情况下,char 类型的数据项是无符号的,所以它的取值范围是0-255.它们可以显式地声明为signed ch ...

  9. ue4中窗口打开web地址

    首先打开项目,设置,widgets,启用webbroswer 新建一个蓝图, 在控件栏里就可以找到添加webbroswer 设置initial url就可以打开网页了, 项目中还用到获取界面参数,与界 ...

  10. vmware克隆Centos6.7虚拟机网卡无法启动问题

    快速处理办法: cat /etc/sysconfig/network-scripts/ifcfg-eth0 sed -i '/UUID/d' /etc/sysconfig/network-script ...