Sublime Text中未知的CSS选项卡完成 [英] Unknown CSS Tab Completion in Sublime Text
问题描述
我看过Tuts + .PPSD到WordPress - 最小组合主题,作者使用选项卡完成sep,然后按Tab键,他得到多行注释分隔符,像CSS:
I've seen "Tuts+. PSD to WordPress – Minimal Portfolio Theme" and the author uses the tab completion "sep" and then presses tab and voila he gets multiple line comment separator for CSS something like:
/****************************************************************************/
/* Name Here */
/****************************************************************************/
我想知道如何在崇高的文本中实现这一点?
I want to know how can I achieve this in sublime text? Using what package?
推荐答案
您看到的标签完成信息很可能是 自定义代码段
The tab completion you saw was most likely a custom snippet
转到工具>新建Snippet并添加以下代码
Go to Tools > New Snippet and add the following code
<snippet>
<content><![CDATA[
/****************************************************************************/
/* ${1:Name Here} */
/****************************************************************************/
]]></content>
<tabTrigger>sep</tabTrigger>
<scope>source.css</scope>
</snippet>
$ {1: c
< tabTrigger> sep< / tabTrigger> / code>是用标签触发代码段的定义文本
< scope> ; source.css< / scope>
表示当您的语法设置为CSS时,代码段将触发。
The <scope>source.css</scope>
indicates that the snippet will fire when your syntax is set to CSS.
$ c> .sublime-snippet
文件扩展名。示例: css-sep.sublime-snippet
Save with the .sublime-snippet
file extension. Example: css-sep.sublime-snippet
这篇关于Sublime Text中未知的CSS选项卡完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!