webstorm 自定义代码模板

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

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

  4. define选择模板应用场景
    https://gyazo.com/b0d8776582e4281f7a0a64d891f0b004blog

相关文章
相关标签/搜索