I am trying to create an Objective-C snippet in Sublime Text 2. I want to define the scope for the snippet so that the snippet is available in all Objective-C files.
But I just cannot find the scope selector for Objective-C. Here is my snippet…
<snippet>
<content><![CDATA[
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>objdid</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.html</scope> -->
</snippet>
I tried the scopes like .m, .h, .Objective-C, .objective-c but nothing worked. Saving the snippet like above makes the snippet to popup in all the files be it .txt or anything else.
If you check the
Objective-C.tmLanguagefile, you will see a key namedscopeNamewith the valuesource.objc. Try that for scope.