Sublime Text 3-代码段不会在标签上触发,仅在CSS文件上触发 [英] Sublime Text 3 - Snippet doesn't fire on tab, only on CSS file

查看:87
本文介绍了Sublime Text 3-代码段不会在标签上触发,仅在CSS文件上触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个片段不会在选项卡触发器上触发。这是我的代码...

I have a snippet that does not fire on the tab trigger. Here's my code...

<snippet>
  <content><![CDATA[
.contentBox ul{list-style: none; padding: 0;}
.contentBox ul li{padding-left: 2.5em; text-indent: -0.7em; margin-bottom: 4px;}
.contentBox ul li:before{content: "${1:•} "; color: #${2:Bullet color};}
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>xcv</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <!-- <scope>source.css</scope> -->
</snippet>

如果我使用的是HTML文件,则选项卡触发器(xcv)可以使用。但是,在CSS文件上,它不起作用。但是,如果我通过CTRL + SHIFT + P选择了代码段,它将输出代码。同样在CSS文件上,如果我尝试在选择器中使用Tab触发器,它将起作用。

If I'm on an HTML file, the tab trigger (xcv) works. However, on a CSS file, it doesn't work. BUT if I select the snippet through CTRL+SHIFT+P, it will output the code. Also on CSS files, if I try the tab trigger within a selector, it will work.

我尝试将范围设置为source.css和text.css(并进行了说明),但没有任何改变。我还重新启动了Sublime。

I've tried setting the scope to source.css and text.css (as well as guiding it out), and none make a difference. I've also restarted Sublime.

有什么想法吗?

推荐答案

我与您有同样的问题,并且找到了解决方案。

I have same issue with you and I had found a resolution to solve it.

我在以下位置阅读过此文件: Sublime Text中未知的CSS制表符完成

I had read it at: Unknown CSS Tab Completion in Sublime Text

要对其进行修复:

您的代码:< tabTrigger> sep< / tabTrigger>

可以使用的确切代码:< tabTrigger> sep /< / tabTrigger>

Exact code to it work: <tabTrigger>sep/</tabTrigger>

希望对您有帮助

这篇关于Sublime Text 3-代码段不会在标签上触发,仅在CSS文件上触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆