在 Sublime Text 2 中获取 Cocoa 方法补全

发布于 2024-12-05 18:49:54 字数 155 浏览 0 评论 0原文

过去几天我一直在玩 Sublime Text 2,想知道是否有人已经成功地让 Cocoa 方法完成工作正常工作了?是否有插件(或正在进行的项目来创建插件)?

任何有关在 Chocolat 或 Sublime Text 2 中使用 Objective-C 的一般性评论也将受到欢迎。

I've been playing with Sublime Text 2 the last few days and was wondering if anyone out there has had any success getting Cocoa method completions working yet? Is there a plugin (or in-progress project to create one) out there?

Any general comments on using Objective-C in Chocolat or Sublime Text 2 would also be welcome.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

妄司 2024-12-12 18:49:54

有一个正在进行的 Sublime Text 包连接到 clang 以获取自动完成数据,名为 SublimeClang 我已经未能成功使其与 Cocoa/UIKit Dev 完全兼容,但这里有一个屏幕截图

Screenshot ofSublime Clang

和我的选项,这是一个开始

There is an in-progress Sublime Text package that connects to clang to get autocomplete data called SublimeClang I've not managed to successfully get it to work totally with Cocoa/UIKit Dev, but here's a screenshot

Screenshot ofSublime Clang

and my options, that are a start

晨曦慕雪 2024-12-12 18:49:54

在 MacVim 中,我使用一个名为 Cocoa.vim 的插件,它具有有用的 python 脚本,可以生成用于自动完成的类和方法文件。我没有对 ST2 进行太多尝试,但可能可以使用所有这些数据创建 sublime-package 或 sublime-completions 文件。

目前,我只创建一个带有一些片段的 sublime-completions 文件。如果我找到办法让这项工作成功,我会告诉你。

In MacVim I use a plugin called Cocoa.vim which haves useful python scripts that generates a classes and methods files for autocompletion. I didn't try so much with ST2, but may be is posible to create a sublime-package or sublime-completions file with all this data.

For the moment, I only create a sublime-completions file with some snippets. If I find a way to make this work, I will tell you.

只为一人 2024-12-12 18:49:54

如果对任何人有帮助的话,我让我的 SublimeClang 配置选项。我已经有一些自动完成功能在工作:

"options":[
        "-Wall",
        "-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/",
        "-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/",
        "-I/usr/lib/clang/3.1/include/**",
        "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/",
        "-arch","armv7",
        "-isysroot", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk",
        "-D__IPHONE_OS_VERSION_MIN_REQUIRED=50000",
        "-ferror-limit=0"
]

I let my SublimeClang configuration options if helps anybody. I've already some of the autocompletions working:

"options":[
        "-Wall",
        "-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/",
        "-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/",
        "-I/usr/lib/clang/3.1/include/**",
        "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/",
        "-arch","armv7",
        "-isysroot", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk",
        "-D__IPHONE_OS_VERSION_MIN_REQUIRED=50000",
        "-ferror-limit=0"
]

在这里回答我自己的问题。快速访问 Sublime 论坛并没有找到任何线索,Google 也没有找到任何线索。看起来 Objective-C 的方法完成目前还不是默认安装的一部分,也不能通过第 3 方提供。

Answering my own question here. A quick visit to the Sublime forums didn't turn up any leads nor did Google. It looks as though method completions for Objective-C aren't currently part of the default install nor available via 3rd-party quite yet.

離殇 2024-12-12 18:49:54

此用户http://b.rthr.me/wp/?p=368声称已经让 SublimeClang 工作了。一旦我尝试过,我可能会亲自报告......

This user http://b.rthr.me/wp/?p=368 claims to have gotten SublimeClang working. I may report back myself once I try it...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文