美文网首页
Vscode-自定义初始模板

Vscode-自定义初始模板

作者: greenteaObject | 来源:发表于2017-10-11 16:21 被阅读0次
  1. 文件 -> 首选项 -> 用户代码片段
  2. 找到你需要修改的文件类型
    例如: vue
{
/*
    // Place your snippets for Vue here. Each snippet is defined under a snippet name and has a prefix, body and 
    // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
    // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
    // same ids are connected.
    // Example:
    "Print to console": {
        "prefix": "log",
        "body": [
            "console.log('$1');",
            "$2"
        ],
        "description": "Log output to console"
    }
*/
    "Print to console": {   
        "prefix": "vue",
        "body": [
            "<template>",
            "  <div class=\"page\">\n",
            "  </div>",
            "</template>\n",
            "<script type=\"text/ecmascript-6\">",
            "  export default {",
            "    data () {",
            "      return {\n",
            "      }",
            "    },",
            "    components: {\n",
            "    }",
            "  }",
            "</script>\n",
            "<style scoped lang=\"stylus\" rel=\"stylesheet/stylus\">\n",
            " ",
            "</style>",
            "$2"
        ],
        "description": "Log output to console"
    }
}
  1. 使用方法 vue+tab键
image.png

相关文章

  • Vscode-自定义初始模板

    文件 -> 首选项 -> 用户代码片段 找到你需要修改的文件类型例如: vue 使用方法 vue+tab键

  • vscode 小要点

    vscode-更换图标主题 VSCode Icons 语法高亮插件 vetur vscode 自定义 html 的...

  • vscode-代码模板使用

    小小学习了下vscode的代码模板使用,还是比较简单的,双引号"记得只用转义字符即可\,需要添加指标法的地方,在引...

  • ncc轻量化单据输出模板生成

    重量端搜索单据模板初始化 启动客户端 输出模板初始化 轻量端输出模板初始化 点击模板--保存

  • iOS自定义代码段模板(CodeSnippets)和文件模板(.

    iOS自定义代码段模板(CodeSnippets)和文件模板(.xctemplate) iOS自定义代码段模板(C...

  • AndroidStudio自定义模板

    1、自定义类描述 2、自定义Activity模板 3、模板代码 #if (${PACKAGE_NAME} && $...

  • [iOS]自定义文件模板(.xctemplate)

    自定义文件模板 通过自定义一个ViewController的文件模板来自动生成模版代码 1. Xcode的文件模板...

  • 《PHP Learning》模板引擎

    《PHP Learning》模板引擎 模板处理使用正则处理模板替换规则保存模板编译结果 模板使用 自定义模板引擎 ...

  • 扩展模版系统

    现在您已经对模板系统的内部有了更多的了解,我们来看看如何使用自定义代码来扩展系统。 大多数模板自定义都以自定义模板...

  • iOS 自定义文件模板和代码段

    使用自定义文件模板和代码段来写代码可以大大提高写代码的效率。 自定义类模板分成两步, 添加模板文件 文件模板路径 ...

网友评论

      本文标题:Vscode-自定义初始模板

      本文链接:https://www.haomeiwen.com/subject/svmwyxtx.html