Pycharm the header template when modifying a new file (default is __author__= ' ... ')

Source: Internet
Author: User
Tags month name

Pycharm Header Template When you modify a new file

default = __author__= ' ... ' [Ellipsis is the default name of your computer]

To modify this author name:

Click: File->settings->editor->file and Code Templete

Click on the Templates tab on the right, there will be some format files when the new template

You can modify these default templates here

To modify Python script as an example:

The default is:

__author__ = ' $USER '

Replace ' $USER ' with the name of the author you want, or you can simply delete the sentence, and when you create a new Python file, it will be blank.

You can also change to another variable, or other code:

1.Plain text.2.#Parse
--Directives to work with includes.3.Predefined variables to is expanded into corresponding valuesinchThe 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 specifyinchThe 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 IDEinchwhich the file would be created.${month_name_short}-The first 3Letters 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 defined rightinchThe template through the#set directive or would be defined during the file creation.To the dollar character ($)inchA variable rendered" as is", use the ${ds} variable instead. This variable evaluates to a plain dollar character ($).

Click to view original text

Pycharm the header template when modifying a new file (default is __author__= ' ... ')

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.