sublime-text3 - sublime中快速变tag快捷键是?
本文介绍了sublime-text3 - sublime中快速变tag快捷键是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
sublime中快速变tag的快捷键是什么来着?
简单举个例子:
比如我输入了 home
, 然后按下快捷键变成<home>
或者<home></home>
已安装emmet.
解决方案
快捷键
针对标准标签(或系统配置、用户配置项),比如
a
、html:5
、ul>li*5
等,是Tab
针对非标准,比如:
<abc>
、<home>
,是Ctrl + E
增加自定义标签:
Preferences
- Package Setting
- Emmet
- Settings - User
比如添加jQuery的匿名函数块,
输入:jquery
→ Tab
{
"snippets": {
"html": {
"snippets" : {
"jquery" : "<script>\n(function(\\$){\n\t${child}|\n})(jQuery);\n</script>",
"jquery:load" : "<script>\n(function(\\$){\n\\$().ready(function(){\n\t${child}|\n});\n})(jQuery);\n</script>",
},
"abbreviations": {
"example": "<div class='example' title='Custom element example'>"
}
}
}
}
${child}| 表示默认光标在那里
这篇关于sublime-text3 - sublime中快速变tag快捷键是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文