How to enable fix-it on Xcode 4.0?
I just upgraded to Xcode 4, and I was reading a Xcode 4 Transition Guide when I found information about a new feature called Fix-it, which show the erros as I type. I am using C++ (.mm files) and set the compiler to LLVM开发者_开发技巧 GCC-4.2, but it is not showing the errors as I type. How can I enable this feature?
They don't show as you type like they say, or at least I haven't been able to get it to show the errors. It just shows you a red circle on the line number that you have to click to get the fix it suggestions. It's pretty lame, but you can use a keyboard shortcut to do the fixing at least. Thankfully they included a "Fix all in scope" key bind too.
Fix Next Issue:
control + Command + '
Fix Previous Issue:
control + Command + "
Fix All In Scope:
control + Command + F
Just tried looking again, and the closest thing I've been able to see about possibly showing errors as you type is to switch to issue navigator and leave that on. Your errors as you type will show up in there, but it is very discrete while in the code view. Then you can just click the issue in the navigator and you'll get your suggestions box, which is nice.
精彩评论