Android Studio出來很久了,大部分已經(jīng)轉(zhuǎn)過來了,相對于Eclipse又是毋庸置疑,更好的使用快捷鍵必定達到事半功倍的效果。
說明:簡書的格式有點亂,不知道怎么調(diào)整,如果想要獲取更好的閱讀效果和體驗,點擊查看博客原文。
友情提示:某些電腦按F1-F12鍵需要先按住FN,比如我的Mac,根據(jù)自己的偏好設定。可點擊演示圖片查看清晰大圖。
說明:以下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) | 快速調(diào)出選擇對話框 | ![]() |
| 打開設置對話框 | 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 | 文件內(nèi)查找 | |
| 查找下一處 | F3 | Command+G | 文件內(nèi) | |
| 查找上一處 | 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 | ![]() |
|
| 跳轉(zhuǎn)到某行 | Control + G | Command + L | 處理Bug時候,看到堆棧異常,然后可以快速定位到某行 | ![]() |
| 打開類型層級 | Control + H | Control + H | 繼承關系,使用時光標要在類文件里面 | ![]() |
| 查看方法層級 | Control + Shift + H | Command + Shift + H | 光標放在方法上才行 | ![]() |
| 方法調(diào)用層級 | 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 | ![]() |
|
| 實現(xiàn)方法 | Control+I | Control+I | I是implements | ![]() |
|
| 快速生成代碼塊 | Control+Alt+T | Command+Option+T | if...else\try...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 | ![]() |
||
| 顯示選中方法的參數(shù) | Control + P | Command+P | ![]() |
||
| 跳轉(zhuǎn)至聲明 | Control+B(Click) | Command+B(Click) | 經(jīng)常用的按住Ctrl+鼠標左鍵 | ||
| 跳轉(zhuǎn)至實現(xiàn)處 | Control+Alt+B | Command + Alt + B | 實現(xiàn)類或方法,如果直接點擊就會去聲明處而不是實現(xiàn) | ![]() |
|
| 跳轉(zhuǎn)至父類或方法 | Control+U | Command+U | 不常用一般點擊就行 | ![]() |
|
| 快速查看實現(xiàn) | Control+Shit+I | Command + Y | 很有用哦 | ![]() |
|
| 顯示/隱藏項目窗口 | Alt+1(數(shù)字1) | Command+1 | ![]() |
||
| 創(chuàng)建書簽 | F11 | F3 | ![]() |
||
| 創(chuàng)建帶有助記詞的書簽 | Control+F11 | Option + F3 | ![]() |
||
| 單行注釋 | Control + / | Command + / | |||
| 多行注釋 | Control +shift+ / | Control +shift+ / | |||
| 擴大代碼塊選中區(qū)域 | Control + W | Option + Up | ![]() |
||
| 減小代碼塊選中區(qū)域 | 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 |







































