gpt4 book ai didi

code-snippets - Sublime Text 2 : name of the scope selector for Objective-C

转载 作者:行者123 更新时间:2023-12-02 22:25:21 25 4
gpt4 key购买 nike

我正在尝试在 Sublime Text 2 中创建一个 Objective-C 片段。我想定义该片段的范围,以便该片段在所有 Objective-C 文件中都可用。

但我就是找不到 Objective-C 的范围选择器。这是我的片段...

<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>

我尝试了 .m.h.Objective-C.objective-c 等作用域> 但没有任何效果。像上面那样保存代码段会使代码段在所有文件中弹出,无论是 .txt 还是其他任何文件。

最佳答案

如果您检查 Objective-C.tmLanguage 文件,您将看到一个名为 scopeName 的键,其值为 source.objc。尝试范围。

关于code-snippets - Sublime Text 2 : name of the scope selector for Objective-C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13063033/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com