Xcode高效开发 ——快捷键

来源:互联网 发布:linux从文件命令变量 编辑:程序博客网 时间:2024/04/28 19:31

注:altoption是同一个键【有的直接使用的键盘上无option键】

1 . 左侧navigator
navigator

command + 1-8 :Xcode左侧navigator
commnad + 0 :为是否隐藏或是打开navigator

2 . 与此相对,右侧的utilities便需要添加option操作了
utilities

option + command + 0 :隐藏或是打开utilities
option + command + 1-2 :显示文档或是帮助

3 . 视图控制区【单文件展示,双文件展示,历史版本对比】

视图控制区

command + enter : 单文件展示
command + option + enter :多文件展示
shift + command + option + enter : 历史版本对比

4 . 文本编辑操作(小括号中标识为便于自己速记,可能与实际有偏差,如有更好理解可以留言我)

control + P(pre) :上一行
control + N(next) :下一行

control + E(end) :当前行的行尾
control + A(ahead):当选行的行首

control + B(back) : 后退光标到上一个位置
control + F(front): 前进逃票到下一个位置

control + K() : 删除当前光标后面部分及下一行所有内容
control + L(location): 将当前光标所在位置放到窗口正中
control + T(transfer): 交换光标两侧字符

option + control + K : 在当前行位置后面添加一行空

option + command + left / right (arrow) : 折叠当前代码块/展开当前已折叠的代码块
shift + option + command + left / right (arrow) : 折叠当前文件中所有的代码块/展开所有已折叠的代码块

5 . Xcode界面及文件定位查找操作

command + J : 快速定位多文件展示区中某一区
command + shift + J : 快速定位当前代码所在文件位置
command + F : 文件内部查找 某一量,方法名等
command + shift + F : 工程内部查找 某一量,方法名等 【项目导航中定位】
command + shift + O : 快速全局查找工程内某一量或方法名 【直接定位,进入到指定文件】
control + command + up / down arrow : 快速切换.h .m

6 . 调试操作

command + y : 是否打开调试断点
shift + command + y : 显示或隐藏断点窗口

command + / : 添加或移除 // 注释
command + \ : 在当前行添加或移除断点

command + . : 停止运行
command + B : 编译
command + R : 运行

其他几个基本的在Xcode属性栏product中便可看到了

0 0