vscode用户代码片段

vue代码片段(xxx.code-snippets(全局))

// vue
{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "\n",
            "\n",
            "\n",
        ],
        "description": "Create vue template"
    }
}

JavaScript 代码片段 ( javascript.json )

{
    "Print to console": {
        "prefix": "cs",
        "body": [
            "console.log($1)"
        ],
        "description": "打印调试日志"
    },
        "validate Phone": {
        "prefix": "vPhone",
        "body": "var reg = /^1[34578]\d{9}$/",
        "description": "正则验证手机格式"
    },
    "validate Telephone": {
        "prefix": "vTel",
        "body": "var reg = /^0\d{2,3}-?\d{7,8}$/",
        "description": "正则验证固定电话"
    },
    "validate Password": {
        "prefix": "vPassword",
        "body": "var reg = /(?!^(\d+|[a-zA-Z]+|[~!@#$%^&*?]+)$)^[\w~!@#$%^&*?]+$/",
        "description": "正则验证密码,必须大小写英文,可带特殊字符"
    }
}

你可能感兴趣的:(vscode用户代码片段)