Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 298
MrDatabase Avatar asked Jun 05 '09 04:06

MrDatabase


People also ask

How do I turn on autocomplete in Xcode?

Go to Xcode > Preferences > Text Editing again. Quit out of Xcode and then relaunch Xcode. Now go to Code completion and check 'Suggest completions while typing'.

How do I get suggestions in Xcode?

Show/hide completions: ⎋ ( Escape ) OR ⌃Space ( Control + Space ) Type some code, use either ⎋ or ⌃Space to toggle auto-complete (I'm hooked on Escape ), and Xcode will offer a few intelligent suggestions to complete your code.

What does P mean in Xcode?

P: property (IIRC Xcode favors L/V for Swift, but you see P for ObjC properties)


2 Answers

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

like image 73
MrDatabase Avatar answered Sep 22 '22 23:09

MrDatabase


control + space also works in the latest Xcode.

like image 37
rogchap Avatar answered Sep 22 '22 23:09

rogchap