mac版和windows版開發常用快捷鍵

#速查表列出了keymap快捷鍵的名稱. 可以直接通過AS setting界面搜索keymap. 通過對應的快捷鍵名稱來添加或者修改快捷鍵.
功能描述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/Comment **command + 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章