首页 > sublime text3 如何快速启动自定义html模板?

sublime text3 如何快速启动自定义html模板?

sublime text3 如何快速启动自定义html模板?


===========分割线,以下是如何使用 html 模板============

===========分割线,以下是如何自定义 html 模板============

默认是不能直接在 ST 中编辑的。安装一个插件PackageResourceViewer。

然后如下操作:

然后就生效了。


菜单--> 新代码段

<snippet>
  <content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <!-- <tabTrigger>hello</tabTrigger> -->
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <!-- <scope>source.python</scope> -->
</snippet>
<content><![CDATA[
属于这标签中的都是要自定义的代码段~
]]></content>

Hello, ${1:this} is a ${2:snippet}. 这句的意思是 tab后自动至${1:this}位置, 初始字符串this, 再次按tab后跳至${2:snippet} 位置... 同前面一个意思

<tabTrigger>hello</tabTrigger> 是要你设定的快捷键提示简写.

<scope>source.python</scope> 说明在什么语言下使用,注释的话意思全局使用.

最后保存至User目录自定义名称.sublime-snippet文件即可!

推荐html神插件Emmet

【热门文章】
【热门文章】