Sublime3 snippet for Markdown

less than 1 minute read

Create new Snippet file

  1. Tools > Developer > New Snippet…
    <snippet>
    <content>
        <![CDATA[

        
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby">            <span class="err">$</span><span class="p">{</span><span class="mi">1</span><span class="ss">:codding</span><span class="p">}</span>
        </code></pre></figure>


        ]]>
        
    </content>
        <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
        <tabTrigger>mdch</tabTrigger>
        <!-- Optional: Set a scope to limit where the snippet will trigger -->
        <scope>text.html.markdown.multimarkdown, text.html.markdown</scope>
        <description>markdown highlight</description>
    </snippet>

    
> ${1:codding}:表示代码插入后,光标所停留的位置
  1. Save file to \Packages\User Markdown_hightlight.sublime-snippet

Leave a Comment