史上最全的Android studio 的快捷鍵 MAC 和Win版本


功能描述keymap對應名字MacWin/Linux
提示錯誤解決方案Show Intention Actionsoption + enteralt + enter
AS配置界面Preferencescommand + ,control+alt+S
工程項目配置界面Project Structurecommand + ;Control+Alt+Shift+S
快速構成代碼Code Generatecommand + Nalt + insert
代碼提示Completion/Basiccontrol + space(mac會衝突, 手動修改)ctrl + 空格(win同樣大部分和輸入法衝突, 手動修改)
選擇視圖select in any viewoption + F1alt + F1
添加書籤標識Toggle Bookmarkoption + F3ctrl + F11
向下移動一行Move Line Downoption + shift + Downalt + shift + Down
向上移動一行Move Line Upoption + shift + Upalt + shift + Up
註釋代碼Comment with Line Commentcommand + /ctrl + /
用代碼模板包裹代碼surround with Live Templatecommand + option + Jctrl + alt + J
格式化代碼Reformat Codecommand + option + Lctrl + alt + L
Copy ReferenceCopy Referencecommand + option + shift + Cctrl + alt + shift + C
if/try等包裹代碼Surround With..command + option + Tctrl + alt + T
查看聲明Declarationcommand + Bctrl + B
快捷向下複製行Duplicate Line or Blockcommand + Dctrl + D
刪除行Delete Linecommand + deletectrl + Y
快捷最近打開Recent Filescommand + Ectrl + E
查找Edit/Find/Findcommand + Fctrl + F
文件方法結構File Structurecommand + F12ctrl + F12
顯示書籤Show Bookmarkscommand + F3shift + F11
代碼高亮向下查找Move To Next Occurrencecommand + GF3
代碼高亮向上查找Move To Previous Occurrencecommand + shift + Gshift + F3
按照模板生成代碼Insert Live Templatecommand + Jctrl + J
定位到行Navigate/Linecommand + Lctrl + G
快速到行首/尾Move Caret to Line Start/Endcommand + Left/Rightctrl + Left/Right
代碼摺疊/展開Collapse/Expandcommand + 減號/加號ctrl + 減號/加號
查找類Navigate/Classcommand + Octrl + N
多行註釋Code/Commentcommand + option + /ctrl + alt + /
格式化代碼Reformat Codecommand + option + Lctrl + alt + L
提示參數類型Parameter Infocommand + Pctrl + P
查找替換Replacecommand + Rctrl + R
查找命令Find Actioncommand + shift + Actrl + shift + A
拷貝文件路徑Copy Pathscommand + shift + Cctrl + shift + C
移動代碼塊Move Statement Up/Downcommand + shift + down/upctrl + shift + down/up
代碼補全Complete Current Statementcommand + shift + enterctrl + shift + enter
全路徑查找Find in Pathcommand + shift + Fctrl + shift + F
代碼高亮Highlight Usages in Filecommand + shift + F7alt + J
窗口內所有代碼摺疊/展開Collapse/Expand Allcommand + shift + 減號/加號ctrl + shift + 減號/加號
查找文件Navigate/Filecommand + shift + Octrl + shift + N
全路徑中替換Replace in Pathcommand + shift + Rctrl + shift + R
大小寫轉換Toggle Casecommand + shift + Uctrl + shift + U
顯示粘貼版歷史Paste from Historycommand + shift + Vctrl + shift + V
快速查找定義 command + spacectrl + shift + I
粘貼Pastecommand + Vctrl + V
複製Copycommand + Cctrl + C
去除無效包引用Optimize Importscontrol + option + Octrl + alt + O
顯示類關係繼承體系Type Hierarchycontrol + Hctrl + H
快速覆寫方法override Methodscontrol + Octrl + O
查找調用的位置Call hierarchycontrol + option + Hctrl + alt + H
添加書籤Toggle BookmarkF3F11
擴大縮小選中範圍Extend Selection/Shrink Selectionoption + UP/Downctrl + W + shift + W
跳轉到父類Super methodcommand + Uctrl + U
關閉當前tab標籤Editor Tabs / Closecommand + Wctrl + shift + a
關閉除編輯窗口的其餘窗口Hide All Tool Windowscommand + shift + F12ctrl + shift + F12
預覽方法定義Quick Definitioncommand + Yctrl + shift + I
返回光標最後編輯位置Last Edit Locationcommand + shift + deletecontrol + shift + Backspace
調到代碼塊首部/尾部Move Caret To Code BlockOption + Command + [ 或者 ]Control+[ 或者 ]
重命名Renameshift + F6shift + F6
抽取方法Extract Methodcommand + option + Mcontrol+alt+M
抽取變量Extract Variablecommand + option + Vcontrol+alt+V
抽取字段Extract Fieldcommand + option + Fcontrol+alt+F
抽取常量Extract Constantcommand + option + Ccontrol+alt+C
抽取參數Extract Parametercommand + option + Pcontrol+alt+P
重構入口Refactor Thiscontrol + Tctrl + alt + shift + T

最近操作
Command +E(mac)    
Ctrl +E   (win)

最近修改
Command +Shift +E  (mac)
Ctrl +shift +enter (win)

文件查找
Command +o (mac)
Ctrl +n (win)

比上邊的那個級別更高 查找
Command +shift+ o(mac)
Ctrl +shift +n (win)

操作記錄
Command +option +Left\Right    (mac)
Command +[   \ ]

Ctrl +alt     +左右鍵(win)  


移動行 
option+shift +  方向鍵上\下(mac)
Alt +shift + 方向鍵 上\下(win)

查找方法的調用處
option+F7   (mac)
Alt +F7   (win)

方法的跟進
Command +B  (mac)
Ctrl +alt +B (win)



顯示方法的參數:
command+p (mac)
Ctrl +p    (win)

行的快速操作:
快速刪除行  command +X  (Mac)
快速複製行  Command +D (Mac)
                    Ctrl D (win)


多行操作
按住 option    然後拖住鼠標
Win 中是  alt


快速補全
Command +shift +enter  (mac)
Ctrl +shift +enter  (win)


快速 生成變量
Option +enter (mac)
Alt +enter (win)



代碼的摺疊

Command +  加號和減號 (mac)
Ctrl + 加號和減號


預覽方法的定義
command +Y  (mac)
Ctrl +shift +I   (win )


抽取方法 
Command +option +M 
Ctrl +alt +M

重構入口
Ctrl +T 

Ctrl +alt +shift  +T

博客地址:http://zhouqiang.vip/


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章