XCode 语法着色损坏
XCode 似乎经常失去理智,并且不会对系统类进行颜色编码或提供正确的“代码感知”建议。这令人无限沮丧。这个问题至少在其他三个场合被问过:
< a href="https://stackoverflow.com/questions/1627033/xcode-code-sense-color-completion-not-working">xcode 代码感知颜色/完成不起作用
我已按项目版本切换到 3.1 兼容和 3.2 兼容,完全重新启动XCode 在每次更改之前和之后都没有效果。
我已经重建了代码感知索引并完全重新启动了 XCode,没有任何更改。
我已经构建了我的项目以确保没有错误并重新启动。
我已将我的文件(无 .svn 文件)复制到不同的位置 - 同样的问题。
我已经完全禁用了参数“占位符”,因为当我输入太快时它们会搞砸我的文档......我所要求的只是“esc”键来显示正确的属性和方法列表。
XCode frequently seems to lose it's mind, and doesn't color code system classes or provide correct "code sense" suggestions. This is endlessly frustrating. The question has been asked on at least three other occasions:
Problems with Xcode Syntax Highlighting
xcode code sense color/completion not working
Xcode: code loses syntax coloring
I have switched by project version to/from 3.1-compatiable and 3.2-compatiable, completely restarting XCode before and after each change with no effect.
I have rebuilt the code sense indexes and completely restarted XCode with no change.
I have built my project to make sure there are no errors and restarted.
I have copied my files (sans .svn files) to a different location - same problem.
I've already completely disabled the argument "placeholders" because they screw up my documents when i type too fast... all I'm asking for is for the "esc" key to display the correct list of properties and methods.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该清理项目的派生数据。它们可能已损坏。
转到组织者>项目>>您的项目>导出数据>删除
Xcode 将会重新索引您的项目,您应该会恢复正常。
You should clean your project's derived data. They are likely corrupted.
Go to Organizer > Projects > Your_Project > Derived Data > Delete
Xcode will reindex your project and you should be back to normal.
对于任何有兴趣的人;我的应用程序有一些预编译指令:
结果发现这些部分之一存在错误。
我假设我的应用程序构建得很好,因为这些部分在到达编译器之前就被删除了......但 CodeSense 并不关心这些(它仍然想要对这些内部的所有内容进行颜色编码) - 所以 CodeSense 会呕吐由于错误而导致的位置,即使我在尝试构建应用程序时没有找到它。
一旦我修复了该代码块中的错误,我的颜色就恢复了。
如果 XCode 只是将这些部分变灰而不是死掉,那就太好了。
For anyone interested; my app has some precompile directives:
Turns out there was an error in one of these sections.
I'm assuming my app built fine because these sections were stripped out before they ever got to the compiler... but CodeSense doesn't care about these (it still wants to color code everything inside these) - so CodeSense would puke all over the place because of the error, even though I didn't find it when I tried to build the app.
Once I fixed the error within that block of code, my coloring returned.
Would be nice if XCode just greyed out those sections instead of dying.