zoukankan      html  css  js  c++  java
  • Pycharm 优化配置

    初次安装使用PyCharm,在新建.py文件时会发现文件头并没有什么信息,因此,使用模板会比较方便。
    方法如下:
    1.打开PyCharm,选择File--Settings
    2.依次选择Editor---Code Style-- File and Code Templates---Python Script
    3.编辑内容
    可以根据需要添加相应的信息

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    """
    ScriptName: ${NAME}
    Project: ${PROJECT_NAME}
    Author: MeiMeiLong.
    Create Date: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}:${SECOND}
    Description:
    """
    __author__ = 'longlong'</code>
    
    #!/usr/bin/env bash
    #ScriptName: ${NAME}
    #Project: ${PROJECT_NAME}
    #Author: MeiMeiLong.
    #Create Date: ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}:${SECOND}
    #Description:
    

    可用的预定义文件模板变量为:

    ###Chinese Ver.
    $ {PROJECT_NAME} - 当前项目的名称。
    $ {NAME} - 在文件创建过程中在“新建文件”对话框中指定的新文件的名称。
    $ {USER} - 当前用户的登录名。
    $ {DATE} - 当前的系统日期。
    $ {TIME} - 当前系统时间。
    $ {YEAR} - 今年。
    $ {MONTH} - 当月。
    $ {DAY} - 当月的当天。
    $ {HOUR} - 目前的小时。
    $ {MINUTE} - 当前分钟。
    $ {PRODUCT_NAME} - 将在其中创建文件的IDE的名称。
    $ {MONTH_NAME_SHORT} - 月份名称的前3个字母。 示例:1月,2月等
    $ {MONTH_NAME_FULL} - 一个月的全名。 示例:1月,2月等
    ###English Ver.
    ${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. 
    
    魏美龍|DevOps Engineer|will_wei_devops@163.com
  • 相关阅读:
    Mysql的select加锁分析
    浅析Kubernetes的工作原理
    HTTP/2部署使用
    Amazon新一代云端关系数据库Aurora
    为什么 kubernetes 天然适合微服务
    深入解读Service Mesh背后的技术细节
    微服务的接入层设计与动静资源隔离
    Prim算法和Kruskal算法介绍
    DAG及拓扑排序
    BFS和DFS
  • 原文地址:https://www.cnblogs.com/meilong/p/IDEA-PYCHARM-USAGE-NOTE.html
Copyright © 2011-2022 走看看