webstorm 自定义代码模板

  1. Ctrl+Shift+A查找设置live
    https://gyazo.com/6878dde9c99e538b562a0f0971daa925
  2. 添加代码片段Live Template
    https://gyazo.com/f0e2f93c1b27d91845a3d8319393be97
  3. 编写代码的时候 缩写+Tab 即可输出代码片段
    https://gyazo.com/56737051ebe64df87c39efc92e1e761f

    缩写启动对应代码片段的钥匙。
    描述代码片段的名字。
    模板文本代码片段的内容。$变量名$为模板中定义的变量,可以在右侧的编辑变量中设置变量信息及Tab顺序

  4. define选择模板应用场景
    https://gyazo.com/b0d8776582e4281f7a0a64d891f0b004
posted @ 2016-06-26 16:46  Mr.Leo  阅读(22364)  评论(0编辑  收藏  举报