我创建了一个包含大约 80 个 sublime-snippet 的库。它们在我的机器上工作得很好,这是我创建它们的机器。然后,我将我的文件夹传递给了我的两个同事,以便他们可以使用我创建的新片段库。唯一的问题是这些片段无法在他们的机器上运行。他们将它安装在 /Sublime Text 3/Packages/MySnippetFolder 中。这些片段旨在用于 .html 文件。然而,它们只出现在我同事的 .py 文件中。范围在 sublime-snippet 文件中被注释掉了,所以它们不应该出现在 .html 文件中吗?非常感谢您提前提供任何建议。
编辑:好的,所以我相信这些片段按预期工作。我现在感到困惑的是,当我在 python 文件中使用它时,会出现一个包含我的片段的下拉列表。当我在我的 html 文件中尝试这个时,没有包含我的片段的下拉列表。有没有办法让下拉列表出现在我的 html 文件中,就像它对 bootstrap 3/4 片段包一样?
这是我的一个片段的代码示例。
<snippet>
<content><![CDATA[
<div class="form-group v-spacing-extra-large">
<p>Minimum: <strong>1</strong> | Maximum: <strong>10</strong> | Multiple <small>(Step)</small>: <strong>1</strong>
</p>
<div class="input-stepper-group">
<a aria-label="Decrease Quantity by 1" tabindex="0" data-stepper-role="decrease" data-stepper-target="#demo-stepper-three" href="#" class="btn btn-secondary js-stepper-control disabled"><i aria-hidden="true" class="icon-minus"></i></a>
<input aria-describedby="product-qty-three-stepper-aria-describedby" aria-label="quantity" data-toggle="stepper" data-round="up" id="demo-stepper-three" class="form-control stepper" pattern="[0-9.]+" type="text" data-min="1" data-max="10" data-step="1" value="1">
<a aria-label="Increase Quantity by 1" tabindex="0" data-stepper-role="increase" data-stepper-target="#demo-stepper-three" href="#" class="btn btn-secondary js-stepper-control"><i aria-hidden="true" class="icon-plus"></i></a>
</div>
<span id="product-qty-three-stepper-aria-describedby" class="ada screen-reader-only">Initial Quantity is set to 1. Max Quantity is set to 10 and the step multiple is set to 1.</span>
</div>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ff-stepper-min1-max10-stepby1</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>