Android Studio快捷鍵動態演示

Android Studio出來好久了,大部分已經轉過來了,相對於Eclipse又是毋庸置疑,更好的使用快捷鍵一定達到事半功倍的效果。git

友情提示:某些電腦按F1-F12鍵須要先按住FN,好比個人Mac,根據本身的偏好設定。可點擊演示圖片查看清晰大圖。此處快捷鍵均是在Default Keymap選項下操做,若是有自定義或更改可能會不一樣,敬請知曉。github

說明:如下2016.7.22更新,此更新在Mac Pro下操做,Windows未測試安全

基本功能

功能 Windows/Linux Mac 說明 演示
保存 Control+S Command+S
同步 Control+Alt+Y Command+Option+Y 沒什麼用
最大/最小編輯器 Control+Shift+F12 Control+Command+F12 沒試出來幹什麼的
添加到喜歡 Alt+Shift+F Option+Shift+F 添加到左邊欄五角星那裏
檢查當前文件與當前配置文件 Alt+Shift+I Option+Shift+I 不知道什麼用
快速選擇框 Control + ` (backquote) Control + ` (backquote) 快速調出選擇對話框
打開設置對話框 Control+Alt+S Command+, (comma)
工程結構對話框 Control+Alt+Shift+S Command+;(semicolon)
切換tab窗口 Control+Tab Control+Tab 編輯打開的文件,和工具窗口

導航和搜索

功能 Windows/Linux Mac 說明 演示
全局搜索 Double Shift Double Shift 經常使用
查找 Control+F Command+F 文件內查找
查找下一處 F3 Command+G 文件內
查找上一處 Shift+F3 Command+Shift+G
替換 Control+R Command+R
查找功能 Coontrol+Shift+A Command+Shift+A 查找Studio的功能
條件查找 Control+Alt+Shift+N Command+Option+O
查找Class Control+N Command+O 經常使用,僅僅查找class,和上面的不一樣
查找文件名 Control+Shift+N Command+Shift+O 同上相似
在文件路徑中查找 Control+Sfift+F Command+Shift+F 全局搜索
文件結構對話框 Control+F2 Command+F12
打開文件切換 Alt + Right/Left Arrow Control + Right/Left Arrow 左右箭頭,可能有衝突
跳到源碼 F4 / Control + Enter F4 / Command + Down Arrow 不經常使用,通常Control/Command +鼠標左鍵
把當前編輯以一個新的窗口打開 Shift + F4 Shift + F4
顯示最近打開過的文件 Control + E Command + E
顯示最近編輯過的文件 Control+Shift+E Command+Shift+E
光標回到最後一次編輯的位置 Control + Shift + Backspace Command + Shift + Backspace(delete) mac筆記本就是delete鍵
關閉當前激活的編輯窗口 Control + F4 Command+W
跳轉到某行 Control + G Command + L 處理Bug時候,看到堆棧異常,而後能夠快速定位到某行
打開類型層級 Control + H Control + H 繼承關係,使用時光標要在類文件裏面
查看方法層級 Control + Shift + H Command + Shift + H 光標放在方法上才行
方法調用層級 Control + Alt + H Control + Option + H 光標放在方法上才行

說明:如下2016.7.28更新,此更新在Windows下操做,Mac未測試編輯器

代碼編輯相關

功能 Windows/Linux Mac 說明 演示
生成代碼 Alt+Insert Command+N setter、getter、toString...
重寫方法 Control+O Control+O O是Override
實現方法 Control+I Control+I I是implements
快速生成代碼塊 Control+Alt+T Command+Option+T if...elsetry...catch...
刪除光標所在行 Control+Y Command+Backspace(delete) mac pro 是delete鍵
摺疊代碼 Control + minus/plus Command + minus/plus 加號減號
摺疊全部代碼 Control + Shift+minus/plus Command +Shift+ minus/plus
複製當前行或選中 Control + D Command+ D
完成代碼片斷 Control + Shift + Enter Command+ Shift + Enter
快速查看文檔 Control + Q Command+ J
顯示選中方法的參數 Control + P Command+P
跳轉至聲明 Control+B(Click) Command+B(Click) 常常用的按住Ctrl+鼠標左鍵
跳轉至實現處 Control+Alt+B Command + Alt + B 實現類或方法,若是直接點擊就會去聲明處而不是實現
跳轉至父類或方法 Control+U Command+U 不經常使用通常點擊就行
快速查看實現 Control+Shit+I Command + Y 頗有用哦
顯示/隱藏項目窗口 Alt+1(數字1) Command+1
建立書籤 F11 F3
建立帶有助記詞的書籤 Control+F11 Option + F3
單行註釋 Control + / Command + /
多行註釋 Control +shift+ / Control +shift+ /
擴大代碼塊選中區域 Control + W Option + Up
減少代碼塊選中區域 Control + Shift + W Option + Down 同上
移動到代碼塊開始 Control+[ Option + Command + [
移動到代碼塊結尾 Control+] Option + Command + ] 同上
按單詞向後刪除 Control+Delete Option + Delete
按單詞向前刪除 Control + Backspace Option + Backspace 同上
整理導包 Control + Alt + O Control + Option + O
項目快速修復(導包) Alt+Enter(回車) Option+Enter
格式化代碼 Control + Alt + L Command+Option + L
右縮進行 Control+Alt+I Control+Option + I 少用
智能加入行 Control + Shift + J Control + Shift + J 少用
智能分割行 Control+回車 Command+回車 少用
增長一行 Shift+回車 Shift+回車

說明:如下2016.7.29更新,此更新在Windows下操做,Mac未測試ide

編譯運行

功能 Windows/Linux Mac 說明 演示
編譯 Control+F9 Command+F
編譯並運行 Shift+F11 Control+R

Debugging

功能 Windows/Linux Mac 說明 演示
Debug Shift+F9 Control+D
單步執行 F8 F8
進入函數裏面 F7 F7
智能進入 Shift+F7 Shift+F7
跳出函數 Shift+F8 Shift+F8
打斷點 Control+F8 Command+F8
查看全部斷點 Control+Shift+F8 Command+Shift+F8

重構

功能 Windows/Linux Mac 說明 演示
複製 F5 F5
移動 F6 F6 移動函數到其餘類文件
安全刪除 Alt+Delete Command+Delete 會檢查其餘地方有沒有使用到
重命名 Shift+F6 Shift+F6
重置參數 Control+F6 Command+F6 我不怎麼用
內聯 Control+Alt+N Command + Option + N 不知道幹嗎的
抽取方法 Control+Alt+M Command + Option + M
抽取變量 Control+Alt+V Command + Option + V
抽取字段 Control+Alt+F Command + Option + F 同上
抽取常量 Control+Alt+C Command + Option + C 同上
抽取參數 Control+Alt+P Command + Option + P 同上

(完)

後續有新的會及時補充,也歡迎你們留言指正補充。函數

做者:lowett
連接:http://fvaryu.github.io/2016/...
版權全部,可轉載,轉載請註明出處。工具

相關文章
相關標籤/搜索