pycharm自定义代码模板

  1. File and Code Templates的作用是文件模板,每次新建文件都会有事先在模板中编辑好的内容

    • File-->Settings-->Editor-->Live Templates
      screenshot_2.png
    • 每次新建的py文件,内容如下
      screenshot_1.png
  2. Live Templates作用是自定义代码片段,通过自定义的字母组合可以联想到相应的代码片段

    • File-->Settings-->Editor-->File and Code Templates
      screenshot_3.png
    • 通过代码联想功能可以找到自己配置的代码片段
      screenshot.png
原文地址:https://www.cnblogs.com/iread9527/p/12833456.html