Sublime Forum

[ST4] HTML snippets

#1

I am adding HTML snippets and they are not being triggered. I have created some Perl ones and they work fine. The HTML ones are not firing. I created an HTML5 header one and it did not work. So I created the default one (as shown below). The files is in “…Snippets\HTML\test.sublime-snippet”.

<snippet>
    <content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>hello</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.html</scope>
</snippet>
0 Likes

#2

the scope should be text.html.basic. press ctrl+alt+shift+p to show scope at cursor position.

0 Likes

#3

Thanks for that. Didn’t know how to grab that and I also thought everything was a “source.something”.

0 Likes