今年的一个目标是手头用的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 |