sublime text3 制作vue文件模板!下面由sublime教程欄目給大家介紹sublime text3如何制作vue文件模板,希望對需要的朋友有所幫助!
1.安裝SublimeTmpl模板
安裝完成 SublimeTmpl
后
可以看到下面這張圖
2.創(chuàng)建 vue 模板
2.1 在路徑:Sublime Text 3PackagesSublimeTmpltemplates 下新建 vue.tmpl 文件:
<template> </template> <script type="ecmascript-6"> </script> <style rel="stylesheet"> </style>
2.2 打開 Default.sublime-commands,復(fù)制粘貼以下配置
,{ "caption": "Tmpl: Create vue", "command": "sublime_tmpl", "args": {"type": "vue"} }
2.3 同上一步驟位置,打開 Key Bindings-Default 設(shè)置熱鍵
[ { "keys": ["ctrl+alt+e"], "command": "sublime_tmpl", "args": {"type": "vue"}, "context": [{"key": "sublime_tmpl.vue"}] } ]
現(xiàn)在你就可以用 Ctrl+Alt+e
就可以建立新的vue模板了
3. 高亮.vue文件
安裝插件 vue-syntax-highlight
新建vue文件后,如果右下角顯示是vue Component就證明可以了。
如果不是,按Ctrl+Shift+P 輸入Vue 切換成set Syntax:Vue Component就可以了。