MrDatabase
MrDatabase

Reputation: 44445

How can I make auto-complete display a list in Xcode

How can I use auto-complete in Xcode like I can in Visual Studio and Eclipse? Specifically in VS and Eclipse auto-complete displays a list of choices... while Xcode just displays a single choice.

For example Xcode might suggest "myVariable" when I type in "myV". That's fine but what if I have the following objects in the scope of my function: "myInt1" and "myInt2"? Xcode will suggest "myInt1" when I type "myI" but I'd like to have a list. Or it would be great to, say, tab through the various possibilities like in some shells. So typing "myI" would get the suggestions "myInt1" and then pressing tab would change the suggestion to "myInt2".

Cheers!

Upvotes: 37

Views: 31123

Answers (3)

Code on the Rocks
Code on the Rocks

Reputation: 17576

Go to Xcode > Settings > Key bindings and search for "Show completions": enter image description here

From here, you can change the shortcut to be whatever you want (I use cmd + space).

Upvotes: 1

rogchap
rogchap

Reputation: 973

control + space also works in the latest Xcode.

Upvotes: 43

MrDatabase
MrDatabase

Reputation: 44445

Press the escape key when auto-complete makes the first suggestion. This will display the list.

Upvotes: 68

Related Questions