Emmet overwritten snippet

喜夏-厌秋 提交于 2019-12-07 22:58:02

问题


I have been following the lessons on HTML and CSS provided by Jeffery Way on Tuts+:

http://learncss.tutsplus.com/

I got to the video on Zen Coding:

http://learncss.tutsplus.com/lesson/zen-coding/

I tried installing Zen Code to Sublime Text 2 but couldn't get it to work. I looked around on the web and found Emmet, which seemed like the new best thing. So I installed through the Command Pallete>"Package Install">"Emmet". It works great, the only issue is a snippet I used before is overwritten by Emmet.

The Snippet I used:

<snippet>
   <content><![CDATA[
<li type="square">${1:Item} ${2:}
]]></content>
   <tabTrigger>li</tabTrigger>
</snippet>

li + Tab would trigger:

<li type="square">

Is there a way for me to add this to Emmet in Sublime Text 2? Or use Emmet to accomplish this tag? I found this guide to Emmet tabtriggers, but could not find this one:

http://docs.emmet.io/cheat-sheet/


回答1:


You can either create your own snippet in Emmet: http://docs.emmet.io/customization/snippets/ http://docs.emmet.io/abbreviations/types/

...or disable li snippet from being handled by Emmet: https://github.com/sergeche/emmet-sublime/blob/master/Emmet.sublime-settings#L55

...or disable Emmet tab trigger and use Ctrl+E: https://github.com/sergeche/emmet-sublime/blob/master/Preferences.sublime-settings#L14

...or rename your ST snippet to something like li2, lit, etc.



来源:https://stackoverflow.com/questions/16447197/emmet-overwritten-snippet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!