Xcode高效開發 ——快捷鍵

注: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中便可看到了

發佈了98 篇原創文章 · 獲贊 3 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章