VSCode模板代码提示

1、打开File-->Preferences-->User Snippets
2、点击打开Edit in python.json
3、添加

{
    "code template 1": {
        "prefix": "template1",
        "body": [
          "# -*- coding:utf-8 -*-"
          "import os"
          ""
          "print(\"Hello World\")"
        ],
        "description": "Code Template 1"
    },
    "code template 2": {
        "prefix": "template2",
        "body": [
          "# -*- coding:utf-8 -*-"
          "import os"
          ""
          "print(\"Hello World\")"
        ],
        "description": "Code Template 2"
    }
}

你可能感兴趣的:(VSCode模板代码提示)