1.安裝SublimeTmpl模板
ctrl+shift+p
輸入sublimeTmpl疮蹦,安裝sublimeTmpl模塊舷暮;
2.創(chuàng)建Vue模板
點(diǎn)開(kāi)Preferences選擇Browse Packages...,打開(kāi)SublimeTmpl文件下的templates文件夾,新建一個(gè)vue.tmpl;
vue.tmpl
<template lang="html">
</template>
<script>
export default {
}
</script>
<style lang="scss">
</style>
3.配置
Preferences——Package Settings——SublimeTmpl——commands-Default(在這個(gè)文件中添下面一段代碼)
,
{
"caption": "Tmpl: Create vue", "command": "sublime_tmpl",
"args": {"type": "vue"}
}
4.添加快捷鍵
Preferences——Package Settings——SublimeTmpl——key Bindings-Default
,
{
"keys": ["ctrl+alt+e"], "command": "sublime_tmpl",
"args": {"type": "vue"}, "context": [{"key": "sublime_tmpl.vue"}]
}