VSCode 配置快速输入函数注释

1、进入vscode选择文件,首选项下的用户代码片段

VSCode 配置快速输入函数注释

2、弹出框输入Python后回车

VSCode 配置快速输入函数注释


3、弹出文件(python.json)输入如下内容,原有内容不要修改或者删除,加入funciton部分


"HEADER":{"prefix": "header",
        "body": [
        "#!/usr/bin/env python",
        "# -*- coding: utf-8 -*-",
        "'''",
        "@File    :   $TM_FILENAME",
        "@Time    :   $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
        "@Author  :   CrissChan ",
        "@Version :   1.0",
        "@Site    :   https://blog.csdn.net/crisschan",
        "@Desc    :   None",
        "'''",
        "",
        "$0"
        ],
    },
    "function": {        
  "prefix": "function",        
  "body": [            
  "'''",            
  "@des  :",            
  "       ",            
  "@params  :",            
  "         ",            
  "@return  :",            
  "          ",           
  "'''",            
  "",            
  "$0"        
  ],    
    },
上一篇:全到你无法想象的VSCode快捷键


下一篇:写完测试脚本怎么运行都是错误的原来是着了“VSCode设置自动保存”的道