随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。

你的呢?


当前回答

Cmd+Option+O to open a file in a separate window. Can configure Tab to always indent. I frequently use it to indent an entire file. Ctrl+Arrow keys to move between camel case words. If you have OneTwo, you can move from One to Two with Ctrl+Right arrow. You can use emacs bindings, there's even kill ring! I use the Ctrl+w and Cmd+C together when I need to copy two different pieces of text. In the documentation browser, you can restrict your searches to a particular library, e.g., just iOS 4.2 library. This helps me focus on API available only on a particular iOS/Mac version of the SDK. Cmd+Shift+A to build and analyze.

其他回答

在PyObjC中,你可以为符号下拉列表做类似的#pragma标记:

#马克:Foo

and

#马克:-

Xcode代码格式化…当你想要编写代码时,它是你需要的东西之一吗 可读性和外观良好。

您可以自己格式化代码,也可以使用脚本节省时间。

一个好方法是…使用Uncrustify。在Xcode中的代码格式化中有解释。

如果高亮显示搞砸了,如果你的变量没有高亮显示或其他任何东西,只需执行⌘-A⌘-X⌘-V,这将全部选中,剪切和粘贴,所有高亮显示将被纠正。所以只要按住⌘,然后按A X V。

完整的快捷方式列表可以在这里找到:http://iphonehuston.blogspot.com/2009/08/shortcuts-for-xcode.html

按左/按右键导航变量或方法名中的单词。没有这个我活不下去。