There are a few magic strings in Sublime.
Snippet for HTML:
<snippet>
<content><![CDATA[
<label for="${1:Id}">${2:Label text}</lablel>
<input type="${3:text}" id="$1" value="${4:something}" />
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>labelinput</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>
Snippet for C#:
<snippet>
<content><![CDATA[
Console.WriteLine("${1:Hello World!}");
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cw</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.cs</scope>
<description>Console.WriteLine("{1}");</description>
</snippet>
When saving language specific settings I need to know the magic string (with casing) in order to name the file correctly (as per my SO question http://stackoverflow.com/questions/32549556/set-word-wrap-for-plain-text-only)
[code]Plain Text.sublime-settings <== Bad
Plain text.sublime-settings <== Good[/code]
- Are these defined somewhere?
- What is the practical difference between
source.*andtext.*?
Thanks all
Dave