使用插件给xcode添加自动完成功能

转自

http://osxdaily.com/2010/05/27/code-completion-in-xcode/

 

 

Code completion in Xcode

 

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”

 

 

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

 

 

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-insIf /Plug-ins/ does not exist, just create the directory. Relaunch Xcode and the plugin is installed and works immediately.

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值