今年的一個目標是手頭用的IDE逐漸從Eclipse徹底轉向IntelliJ IDEA,包括快捷鍵的設置。因此這裡整理Eclipse和IDEA的快捷鍵映射表,以便隨時查用。
序號 | 中文名 | 英文名 | Eclipse | IDEA | 備註 |
1 | 核心快捷鍵 | ||||
2 | 智能代碼完成 | Smart code completion | Alt+/ | Ctrl+Shift+Space | |
3 | 通用搜索 | Search everywhere | Double_Shift | ||
4 | 快速修復 | Show intention actions and quick-fixes | Ctrl+1 | Alt+Enter | |
5 | 代碼生成 | Generate code | Alt+Shift+S | Alt+Ins | |
6 | 參數信息 | Parameter info | Alt+/ | Ctrl+P | |
7 | 選中當前代碼塊 | Extend selection | Ctrl+W(連續按持續擴大範圍) | ||
8 | 縮小選中的當前代碼塊 | Shrink selection | Ctrl+Shift+W(連續按持續縮小範圍) | ||
9 | 最近打開的文件,或一些常用窗口 | Recent files popup | Ctrl+E | ||
10 | 重命名 | Rename | Alt+Shift+R | Shift+F6 | |
11 | 重做 | Redo | Ctrl+Y | Ctrl+Shift+Z、Alt+Shift+Backspace | |
12 | 撤銷 | Undo | Ctrl+Z | Ctrl+Z、Alt+Backspace | |
13 | 普通快捷鍵 | ||||
14 | 打開工具窗口 | Open corresponding tool window | Alt+#[0-9] | ||
15 | 切換項目面板 | Focus the Project tool window | Alt+1 | ||
16 | 光標選中編輯窗口 | Focus the editor | Esc | ||
17 | 保存所有 | Save all | Ctrl+Shift+S | Ctrl+S | |
18 | 同步 | Synchronize | F5 | Ctrl+Alt+Y | |
19 | 且換編輯器最大化 | Toggle maximizing editor | Ctrl+Shift+F12 | ||
20 | 用當前的配置檢查當前代碼 | Inspect current file with current profile | Alt+Shift+I | ||
21 | 快速切換當前主題 | Quick switch current scheme | Ctrl+~ | ||
22 | 打開設置窗口 | Open Settings dialog | Ctrl+Alt+S | ||
23 | 打開項目結構設置窗口 | Open Project Structure dialog | Ctrl+Alt+Shift+S | ||
24 | Find Action | Ctrl+Shift+A(與各種軟件快捷鍵衝突) | |||
25 | 調試 | ||||
26 | 單步跳過/進入 | Step over/into | F6/F5 | F8/F7 | |
27 | 智能單步跳過/進入 | Smart step into/out | F6/F5 | Shift+F7/Shift+F8 | |
28 | 運行到光標位置 | Run to cursor | Alt+F9 | ||
29 | 計算表達式 | Evaluate expression | Alt+F8 | ||
30 | 恢復運行 | Resume program | F8 | F9 | |
31 | 加/取消斷點 | Toggle breakpoint | Ctrl+Shift+B | Ctrl+F8 | |
32 | 查看斷點列表 | View breakpoints | 無 | Ctrl+Shift+F8 | |
33 | 搜索/替換 | ||||
34 | 通用搜索 | Search everywhere | Double_Shift | ||
35 | 查找 | Find | Ctrl+F | Ctrl+F | |
36 | 查找下一個/上一個 | Find next/previous | Ctrl+K/Ctrl+Shift+K(查找對話框關閉時) | F3/Shift+F3 | |
37 | 替換 | Replace | Ctrl+F | Ctrl+R | |
38 | 路徑中查找 | Find in path | Ctrl+H | Ctrl+Shift+F | |
39 | 路徑中替換 | Replace in path | Ctrl+H | Ctrl+Shift+R | |
40 | 選擇下一處匹配的 | Select next occurrence | Ctrl+. | Alt+J | |
41 | Select all occurrences | Ctrl+, | Ctrl+Alt+Shift+J | ||
42 | Unselect occurrence | Alt+Shift+J | |||
43 | 編輯 | ||||
44 | 代碼完成 | Basic code completion | Alt+/ | Ctrl+Space(與Win衝突) | |
45 | 智能代碼完成 | Smart code completion | Ctrl+Shift+Space | ||
46 | 完成語句 | Complete statement | Ctrl+Shift+Enter | ||
47 | 參數信息 | Parameter info (within method call arguments) | Ctrl+P | ||
48 | 顯示Javadoc | Quick documentation lookup | Mouse_Over | Ctrl+Q | |
49 | External Doc | Shift+F1 | |||
50 | Brief Info | Ctrl+mouse | |||
51 | Show descriptions of error at caret | Ctrl+F1 | |||
52 | 代碼生成 | Generate code... | Alt+Shift+S | Alt+Ins | |
53 | 覆寫方法 | Override methods | Ctrl+O | ||
54 | 實現方法 | Implement methods | Ctrl+I | ||
55 | 快速生成代碼塊 | Surround with… | Alt+Shift+Z | Ctrl+Alt+T | |
56 | 切換行註釋 | Comment/uncomment with line comment | Ctrl+Shift+/、Ctrl+Shift+\ | Ctrl+/ | |
57 | 切換塊註釋 | Comment/uncomment with block comment | Ctrl+/ | Ctrl+Shift+/ | |
58 | 擴大當前選中的代碼塊 | Extend selection | Ctrl+W(連續按持續擴大範圍) | ||
59 | 縮小當前選中的代碼塊 | Shrink selection | Ctrl+Shift+W | ||
60 | Context info | Alt+Q | |||
61 | 快速修復 | Show intention actions and quick-fixes | Alt+Enter | ||
62 | 格式化代碼 | Reformat code | Ctrl+Shift+F | Ctrl+Alt+L | |
63 | 組織imports | Optimize imports | Ctrl+Shift+O | Ctrl+Alt+O | |
64 | 自動縮進行 | Auto-indent line(s) | Ctrl+Alt+I | ||
65 | 縮進/不縮進選擇的行 | Indent/unindent selected lines | Tab/Shift+Tab | ||
66 | 剪切當前行 | Cut current line to clipboard | Ctrl+X,Shift+Delete | ||
67 | 複製當前行 | Copy current line to clipboard | Ctrl+C,Ctrl+Insert | ||
68 | 粘貼 | Paste from clipboard | Ctrl+V,Shift+Insert | ||
69 | 粘貼最近的剪貼板歷史 | Paste from recent buffers... | Ctrl+Shift+V | ||
70 | 複製並粘貼當前行 | Duplicate current line | Ctrl+Alt+↓ | Ctrl+D | |
71 | 刪除當前行 | Delete line at caret | Ctrl+D | Ctrl+Y | |
72 | 智能行合併 | Smart line join | Ctrl+Shift+J | ||
73 | 智能行分隔 | Smart line split | Ctrl+Enter | 貌似沒用 | |
74 | 新一行 | Start new line | Shift+Enter | 貌似沒用 | |
75 | 變換大小寫 | Toggle case for word at caret or selected block | Ctrl+Shift+U | ||
76 | 選擇到代碼塊的結束/起始 | Select till code block end/start | Ctrl+Shift+]/[ | ||
77 | 刪除到詞語結束 | Delete to word end | Ctrl+Delete | ||
78 | 刪除到詞語開頭 | Delete to word start | Ctrl+Backspace | ||
79 | 展開/摺疊代碼塊 | Expand/collapse code block | Ctrl+NumPad+/- | ||
80 | 展開所有代碼 | Expand all | Ctrl+Shift+NumPad+ | ||
81 | 摺疊所有代碼 | Collapse all | Ctrl+Shift+NumPad- | ||
82 | 關閉當前Tab窗口 | Close active editor tab | Ctrl+F4 | Ctrl+F4 | 所有軟件通用 |
83 | 豎列編輯 | Column mode | Shift+Alt+A | Shift+Alt+Ins | |
84 | 重構 | ||||
85 | 複製類 | Copy Class | 無 | F5 | |
86 | 移動類/方法 | Move Class/Method | Alt+Shift+V | F6 | |
87 | 安全刪除 | Safe Delete | Alt+Delete | ||
88 | 重命名 | Rename | Alt+Shift+R | Shift+F6 | |
89 | 重構菜單 | Refactor this | Alt+Shift+T | Ctrl+Alt+Shift+T | 有用 |
90 | 修改方法簽名 | Change Signature | Alt+Shift+C | Ctrl+F6 | |
91 | 內聯 | Inline | Ctrl+Alt+N | ||
92 | 提取成方法 | Extract Method | Ctrl+Alt+M | ||
93 | 提取成變量 | Extract Variable | Ctrl+Alt+V | ||
94 | 提取成成員變量 | Extract Field | Ctrl+Alt+F | ||
95 | 提取成常量 | Extract Constant | Ctrl+Alt+C | ||
96 | 提取成參數 | Extract Parameter | Ctrl+Alt+P | ||
97 | 導航 | ||||
98 | 打開任意類 | Go to class | Ctrl+Shift+T | Ctrl+N | |
99 | 打開任意文件 | Go to file | Ctrl+Shift+R | Ctrl+Shift+N | |
100 | 查找類中方法和字段 | Go to symbol | 無 | Ctrl+Alt+Shift+N | |
101 | 到下一個/上一個Tab窗口 | Go to next/previous editor tab | Alt+→/← | ||
102 | 返回到上一個工具窗口 | Go back to previous tool window | F12 | ||
103 | 從工具窗口返回到編輯器窗口 | Go to editor (from tool window) | Esc | ||
104 | 隱當前工具窗口(或上一個工具窗口) | Hide active or last active window | Shift+Esc | ||
105 | 跳到xx行 | Go to line | Ctrl+G | ||
106 | 打開最近的文件 | Recent files popup | Ctrl+E | ||
107 | 導航回退/前進 | Navigate back/forward | Alt+←/→ | Ctrl+Alt+←/→ | |
108 | 導航到上一個編輯點 | Navigate to last edit location | Ctrl+Q | Ctrl+Shift+Backspace | |
109 | 當前的文件在任何工具視圖中打開 | Select current file or symbol in any view | Alt+F1 | 有用 | |
110 | 打開光標處的申明 | Go to declaration | Ctrl+T,F3 | Ctrl+B,Ctrl+Click | |
111 | 打開光標處的實現 | Go to implementation(s) | Ctrl+Alt+B | ||
112 | 在模態框中查看定義的代碼 | Open quick definition lookup | Ctrl+Shift+I | ||
113 | 跳轉到變量所屬的類的聲明 | Go to type declaration | Ctrl+Shift+B | ||
114 | 跳轉到上級方法/上級類 | Go to super-method/super-class | Ctrl+U | ||
115 | 跳轉到上一個/下一個方法 | Go to previous/next method | Alt+Up/Down | ||
116 | 移動到代碼塊結尾/開始 | Move to code block end/start | Ctrl+]/[ | ||
117 | 顯示類中的變量、方法 | File structure popup | Ctrl+O | Ctrl+F12 | |
118 | 查看繼承關係(Type Hierarchy) | F4 | Ctrl+H | ||
119 | 方法層次結構 | Method hierarchy | Ctrl+Shift+H | ||
120 | 調用層次結構 | Call hierarchy | Ctrl+Alt+H | Ctrl+Alt+H | |
121 | 下一個/上一個錯誤 | Next/previous highlighted error | F2/Shift+F2 | ||
122 | 查找變量來源 | Edit source / View source | F4/Ctrl+Enter | ||
123 | 跳到導航條 | Show navigation bar | Alt+Home | ||
124 | 切換書籤 | Toggle bookmark | F11 | ||
125 | 切換書籤(帶標記的書籤) | Toggle bookmark with mnemonic | Ctrl+F11 | ||
126 | 跳轉到標記的書籤 | Go to numbered bookmark | Ctrl+#[0-9] | ||
127 | 顯示書籤 | Show bookmarks | Shift+F11 | ||
128 | 編譯/運行 | ||||
129 | 編譯工程 | Make project | Ctrl+B | Ctrl+F9 | |
130 | 編譯選定內容 | Compile selected file, package or module | Ctrl+Shift+F9 | ||
131 | 運行/調試使用選定的配置 | Select configuration and run/debug | Alt+Shift+F10/F9 | ||
132 | 運行/調試 | Run/Debug | Ctrl+F11/F11 | Shift+F10/F9 | |
133 | 從編輯器運行 | Run context configuration from editor | Ctrl+Shift+F10 | ||
134 | 引用搜索 | ||||
135 | 查找引用 | Find usages / Find usages in file | Ctrl+Shift+G | Alt+F7/Ctrl+F7 | |
136 | 高亮文件中的引用 | Highlight usages in file | Ctrl+Shift+F7 | ||
137 | 查看引用(打開模態框) | Show usages | Ctrl+Shift+G | Ctrl+Alt+F7 | |
138 | 代碼版本管理/本地歷史 | ||||
139 | Commit代碼 | Commit project to VCS | Ctrl+K | ||
140 | 從代碼庫裡更新代碼 | Update project from VCS | Ctrl+T | ||
141 | Push代碼 | Push commits | Ctrl+Shift+K | ||
142 | 代碼管理模態框 | ‘VCS’ quick popup | Alt+BackQuote(`) | 有用 | |
143 | 模板 | ||||
144 | Surround with Live Template | Ctrl+Alt+J | 沒用 | ||
145 | 插入模板 | Insert Live Template | Ctrl+J | ||
146 | 其它 | ||||
147 | 查看當前類圖 | Ctrl+Alt+U |