1. 程式人生 > >Mac 下android studio 快捷鍵

Mac 下android studio 快捷鍵

快速跳轉到實現

檢視某個介面在哪裡被實現
操作步驟:

選單欄: Navigate —> Implementation
快捷鍵:

Mac: Option + Command + B
Windows\/Linux: Ctrl + Alt + B

表格說明

快捷鍵 描述
F1 Quick Documentation 開啟方法類等的文件
F2 Next Highlighted Error 順序快速定位高亮錯誤
Shift + F2 Previous Highlighted Eorror 逆序快速定位高亮錯誤
F3 Toggle Bookmark(新增/移除書籤)
Command + F3 Show Bookmarks(開啟書籤對話方塊)
Shift + F2 Previous Highlighted Eorror 逆序快速定位高亮錯誤
F4 Jump to Source(跳轉到原始碼)
F5 Copy.. (複製當前檔案)
F6 Move.. (移動當前檔案)
F7 Step Into(debug時跳進方法內部)
F8 Step Over(debug時跳到下一行)
Command + , Preferences… (開啟開發工具設定介面)
Command + Delete Delete Line(刪除行)
Command + D Duplicate Line or Block(複製行或者程式碼塊)
Command + W Close active editor tab (關閉啟用的頁籤)
Command + P Parameter Info(方法引數提示)
Command + Q Exit(退出開發工具)
Command + K Check In Project(展示本地改動及提交程式碼)
Command + T Update Project (更新程式碼)
Command + B Declaration(跳轉到方法、類、欄位等的宣告)
Command + F Find…(查詢文字)
Command + R Replace…(替換文字)
Command + = Expand(展開程式碼)
Command + - Collapse(摺疊程式碼)
Command + E Recent Files(最近開啟的檔案)
Command + O Class…(查詢類)
Command + N Generate… (生成程式碼)
Command + J Insert Live Template…(自動生成模版程式碼)
Command + L Line… (跳轉到指定行)
Command + / Comment/uncomment with line comment (行註釋)
Command + F9 Make project (構建專案)
Command + Alt + / Comment/uncomment with block comment (塊註釋)
Command + Alt + M Extract Method (匯出方法)
Command + Alt + V Extract Variable (匯出變數)
Command + Alt + F Extract Field (匯出欄位)
Command + Alt + C Extract Constant (匯出常量)
Command + Alt + L Reformat Code…(格式化程式碼)
Command + Alt + T Surround with… (if..else, try..catch, for, synchronized, etc.) (包括程式碼塊生成)
Alt + F7 Find usages (查詢引用)
Command + Alt + F7 Show usages (展示引用下拉框)
Command + Shift + O Go to File(跳轉到檔案)
Command + Shift + U Toggle case for word at caret or selected block (切換選中的單詞或者程式碼塊的大小寫)
Double Shift Search everywhere (搜尋工程中的任何位置的檔案)
Shift + F6 Rename…(重新命名)
Command + F6 Change Signature (更改方法簽名)
Command + N Generate (方法快捷處理)
Control + O Override methods (覆蓋父類的方法)
Control + I Implement methods (實現介面的方法)
Control + R Run (執行程式到裝置)
Control + D Dubug (debug程式到裝置)
Control + H Type hierarchy (檢視類的層級結構)
Control + Alt + O Optimize imports (優化導包)
option + enter(回車) Extract Resource (提取字串到string.xml檔案)等操作
Command + Shift + A 萬能的輸入框