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

你的呢?


当前回答

如果你有一个多点触控功能的Mac -使用MultiClutch来映射一些由鼠标手势描述的击键。

我用三个手指向前和向后在文件历史中向前和向后移动(cmd-alt-.),并在.h和.m之间切换。

其他回答

选择一个文本块并输入cmd-/将其注释掉。再次执行此操作以删除注释字符。

当通过双击平衡字符(括号、大括号、方括号)与大括号匹配结合使用时,这尤其有用。

右键单击函数中的变量,然后单击edit all in scope。自从我发现了这个,我就一直在用它。

ctrl⌘T

使用AppKiDo浏览文档。

在Xcode中使用Accessorizer来完成一堆单调、重复的任务。

通过命令行控制Xcode的文本编辑器:xed

> xed -x                # open a new untitled document
> xed -xc foo.txt       # create foo.txt and open it
> xed -l 2000 foo.txt   # open foo.txt and go to line 2000

# set Xcode to be your EDITOR for command line tools
# e.g. for subversion commit
> echo 'export EDITOR="xed -wcx"' >> ~/.profile

> man xed               # there's a man page, too

CTRL + Alt +⌘+ r清除日志