Code completion in Xcode

May 27, 2010 - 2 Comments

Code completion is one of the more useful features when you’re developing since it allows you to write code faster. While Code completion should be activated by default in newer versions of Xcode, it’s easy to enable and use if it isn’t. You can also improve the usability of Xcode’s code completion with a great third party plugin, skip to the bottom of the article for that.

Enable code completion in Xcode

* Within Xcode, go to Preferences
* Click on the “Code Sense” icon
* Look for the “Code Completion” section and select ‘Immediate’ from the “Automatically Suggest” drop down menu
* Click “OK”
code completion xcode

Using Code completion in Xcode

Once enabled, Xcode will now offer code completion based on what you have typed and offer suggestions for completing the syntax.
* You accept the code suggestion by pressing the Tab key or Return
* You can see a full list of completion suggestions by hitting the Escape key
xcode code completion

It’s interesting to note that Apple says Code completion is disabled by default, but in newer versions of Xcode it seems to be enabled by default instead.

Improve Xcode code completion with Auto Assistant plugin

Code completion isn’t perfect in Xcode, but that doesn’t mean there aren’t solutions from third parties. A very helpful Xcode plugin for developers is called Xcode Auto Assistant, and it offers the ability to popup the completion list automatically, all the time, when a character it recognizes is entered. The behavior then becomes closer to how things like Coda, BBedit, Espresso, etc handle code completion. The plugin is a lot more consistent than what Apple offers by default, although I wouldn’t be surprised if this is changed soon with an update to Xcode. Until Apple adjusts the behavior, you can download the plugin from Google Code here.

After you download the Auto Assistant plugin, you’ll need to drop the plugin into the following directory:
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins If /Plug-ins/ does not exist, just create the directory. Relaunch Xcode and the plugin is installed and works immediately.

xcode completion plugin

.

Related articles:

Posted by: Manish Patel in Development, Mac OS

2 Comments

» Comments RSS Feed

  1. Steve says:

    This is awesome, thanks!

  2. […] 4th, 2010 – Development, Mac OS X – No Comments So you just downloaded the awesome Xcode code completion plugin (or any other) and you need to get it working… easy. You can install any Xcode plugin […]

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site