随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
alt -左&右转到行尾/开始。这与ctrl -左&右一起移动到下一个大写字母或换行字。这两个帮我省了不少时间
其他回答
事实上,我可以使用Emacs作为我的编辑器,Xcode作为我的构建器/调试器……在我看来,这是两全其美。
如果高亮显示搞砸了,如果你的变量没有高亮显示或其他任何东西,只需执行⌘-A⌘-X⌘-V,这将全部选中,剪切和粘贴,所有高亮显示将被纠正。所以只要按住⌘,然后按A X V。
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.
至于“快速打开”功能——它很棒,但我总是错过TextMate用于浏览项目和文件(符号,方法等)的cmd-shift-t。
这就是为什么我发布了一个Xcode插件来提供这个功能。它叫做Code Pilot,你可能想看看它:http://macoscope.net/en/mac/codepilot/
Xcode代码格式化…当你想要编写代码时,它是你需要的东西之一吗 可读性和外观良好。
您可以自己格式化代码,也可以使用脚本节省时间。
一个好方法是…使用Uncrustify。在Xcode中的代码格式化中有解释。