Xcode 5 now displaced Xcode 4, and one common complaint that I had against both IDEs is that they don't autocomplete very aggressively. In Visual Studio, autocompletion is committed as soon as you hit a non-identifier key (like a parenthesis, a comma, a dot, a space, etc). On Xcode 5, you have to hit tab or enter.
Is there a known way to get a behavior closer to Visual Studio's for autocompletion?
Press the escape key when auto-complete makes the first suggestion. This will display the list. Escape or control-comma will show the list, control-period will accept the current suggestion and (subsequently) rotate through suggestions, control-slash will move to the next placeholder argument that was inserted.
Yes. XCode does have code completion a.k.a. intellisense.
You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)
Go to Tools | Options | Text Editor | C/C++. This dialog displays a window that allows you to toggle Automatic brace completion. Automatic brace completion is the feature where, when you type { , a corresponding } is automatically typed for you.
You can select following two options from XCode->Preferences->Text Editing:
You're not listing the other problem, XCode autocompletes by alphabetical values, not compatible ones. Visual Studio actually gives you things that work, but in XCode you can shove an Int to a class or visa-versa thanks to autocomplete.
The options that come closest are in XCode menu->Preferences->Text Editing. However, it doesn't have what you are after. I do notice autocompleting the brackets isn't very intelligent and I may turn mine off soon.
Anyway, the XCode alternative IDE actually has contextual autocomplete, which greatly improves your ability to code without looking at the docs. Unsure what its preferences are but it may be worth looking at. I'm not trying to advertise it so I'll let you google the XCode alternative if you want to.
In practice, the . and , "stopping" autocomplete actually saves me many times. For example, write for(int x = 0; x < 5; x++) {} then try to change the x to a y. Autocomplete will step in and completely throw you off, unless you hit space or . or ,. If you had aggressive autocomplete, it would shove in its nonworking alphabetical value at the top of the list.
Long story short, XCode 4 isn't separate from the rest of the mac, a nightmare when you try to go and use it. For one clear example, take a large text file in TextEdit, and scroll halfway down. Wait a second, now try to highlight half of the document. (Your scroll bar will disappear before you can do anything, for example).
The answer you're looking for may or may not exist, but I hoped to provide you with some alternatives that may satisfy your craving. The example at the end just shows the true nature of the tools and their UI principle.
There's always Monodevelop, (not objective C, but should be more customizable), or perhaps an ide that has Objective C, if you don't mind coding in alternatives.
Good luck, I wish XCode had more customizing too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With