1.安装SublimeTmpl模板
ctrl+shift+p
输入sublimeTmpl,安装sublimeTmpl模块;
2.创建Vue模板
点开Preferences选择Browse Packages...,打开SublimeTmpl文件下的templates文件夹,新建一个vue.tmpl;
vue.tmpl
<template lang="html">
</template>
<script>
export default {
}
</script>
<style lang="scss">
</style>
3.配置
Preferences——Package Settings——SublimeTmpl——commands-Default(在这个文件中添下面一段代码)
,
{
"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"}]
}