0

I created the following snippet in Sublime Text. It seems doesn't get triggered by the tab. If I change the contents to some other language, or some plain text, it is working. For html, it doesn't work. Any help is appreciated.

   <snippet>
        <content><![CDATA[
    <li class="timeline-inverted">
      <div class="timeline-badge ${1:type)"><i class="fa fa-calendar"></i></div>
      <div class="timeline-panel wow fadeInDown">
        <div class="timeline-heading">
          <h4 class="timeline-title">${2:year}</h4>
        </div>
        <div class="timeline-body">
          <p>${3:data}</p>
        </div>
      </div>
    </li>
    ]]></content>
        <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>tmeln</tabTrigger>
    <description>timeline-body</description>
    </snippet>

1 Answer 1

3

This is because on line 4 in the class attribute of the <div> you open with a curly brace { but close with parentheses ).

To resolve the issue use this snippet (removed the parentheses and added a curly brace)

The snippet

<snippet>
  <content><![CDATA[
    <li class="timeline-inverted"><!--   ▾ Here -->
      <div class="timeline-badge ${1:type)"><i class="fa fa-calendar"></i></div>
      <div class="timeline-panel wow fadeInDown">
        <div class="timeline-heading">
          <h4 class="timeline-title">${2:year}</h4>
        </div>
        <div class="timeline-body">
          <p>${3:data}</p>
        </div>
      </div>
    </li>
    ]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>tmeln</tabTrigger>
    <description>timeline-body</description>
</snippet>

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.