To find any action inside the IDE use
Find Action Ctrl+Shift+A/ A 查找快捷键,action快捷入口的快捷键
Editing 编辑
Ctrl + Space | Basic code completion (the name of any class,method or variable) | 基本的代码补全 |
Ctrl + Shift + Space | Smart code completion (filters the list of methodsand variables by expected type) | 智能代码补全 |
Ctrl + Shift + Enter | Complete statement | 补全当前语句 |
Ctrl + P | Parameter info (within method call arguments) | 显示函数的参数信息 |
Ctrl + Q | Quick documentation lookup | 快速文档查找 |
Shift + F1 | External Doc | 外部文档 |
Ctrl + mouse over code | Brief Info | 简要信息显示 |
Ctrl + F1 | Show descriptions of error or warning at caret | 显示错误或警告的说明 |
Alt + Insert | Generate code... (Getters, Setters, Constructors,hashCode/equals, toString) | 生成(Getters, Setters, Constructors,hashCode/equals, toString)代码 |
Ctrl + O | Override methods | 重写方法 |
Ctrl + I | Implement methods | 实现方法 |
Ctrl + Alt + T | Surround with… (if..else, try..catch, for,synchronized, etc.) | 用if..else, try..catch, for,synchronized等环绕代码块 |
Ctrl + / | Comment/uncomment with line comment | 注释/取消注释代码行 |
Ctrl + Shift + / | Comment/uncomment with block comment | 注释/取消注释代码块 |
Ctrl + W | Select successively increasing code blocks | 依次选择更多的代码块 |
Ctrl + Shift + W | Decrease current selection to previous state | 依次减少选择的代码块 |
Alt + Q | Context info | |
Alt + Enter | Show intention actions and quick-fixes | 显示意图行动和快速修复 |
Ctrl + Alt + L | Reformat code | 重新格式化代码 |
Ctrl + Alt + O | Optimize imports | 优化导入的import |
Ctrl + Alt + I | Auto-indent line(s) | 自动缩进行 |
Tab / Shift + Tab | Indent/unindent selected lines | 缩进/取消缩进 |
/Ctrl + X or Shift + Delete | Cut current line or selected block to clipboard | 剪切当前行或者选中的代码段到剪切板 |
Ctrl + C or Ctrl + Insert | Copy current line or selected block to clipboard | 复制当前行或者选中的代码段到剪贴板 |
Ctrl + V or Shift + Insert | Paste from clipboard | 从剪切板粘贴 |
Ctrl + Shift + V | Paste from recent buffers... | 粘贴最近复制的内容 |
Ctrl + D | Duplicate current line or selected block | 复制当前行或选中的代码 |
Ctrl + Y | Delete line at caret | 删除行 |
Ctrl + Shift + J | Smart line join | 智能合并行 |
Ctrl + Enter | Smart line split | 智能分割行 |
Shift + Enter | Start new line | 新建一行 |
Ctrl + Shift + U | Toggle case for word at caret or selected block | 将选中代码块转为小写 |
Ctrl + Shift + ] / [ | Select till code block end/start | 向前/向后选中代码段 |
Ctrl + Delete | Delete to word end | 向后删除一个单词 |
Ctrl + Backspace | Delete to word start | 向前删除一个单词 |
Ctrl + NumPad+/- | Expand/collapse code block | 展开/折叠代码段 |
Ctrl + Shift + NumPad+ | Expand all | 全部展开 |
Ctrl + Shift + NumPad- | Collapse all | 全部折叠 |
Ctrl + F4 | Close active editor tab | 关闭当前标签 |
Search/Replace 查找/替换
Double Shift | Search everywhere | 搜索任何地方的任何东西 |
Ctrl + F | Find | 查找 |
F3 | Find next | 查找下一个 |
Shift + F3 | Find previous | 查找上一个 |
Ctrl + R | Replace | 替换 |
Ctrl + Shift + F | Find in path | 在路径中查找 |
Ctrl + Shift + R | Replace in path | 在路径中替换 |
Ctrl + Shift + S | Search structurally (Ultimate Edition only) | 查找机构(商业版有效) |
Ctrl + Shift + M | Replace structurally (Ultimate Edition only) | 替换结构(商业版有效) |
Usage Search 查找使用
Alt + F7 / Ctrl + F7 | Find usages / Find usages in file | 查找使用 |
Ctrl + Shift + F7 | Highlight usages in file | 在文件中高亮被使用处 |
Ctrl + Alt + F7 | Show usages | 显示使用 |
Compile and Run 编译和运行
Ctrl + F9 | Make project (compile modifed and dependent) | 编译项目 |
Ctrl + Shift + F9 | Compile selected file, package or module | 编译选中的文件、包或者木块 |
Alt + Shift + F10 | Select configuration and run | 选择配置然后运行 |
Alt + Shift + F9 | Select configuration and debug | 选择哦诶之然后调试 |
Shift + F10 | Run | 运行 |
Shift + F9 | Debug | 调试 |
Ctrl + Shift + F10 | Run context configuration from editor |
Debugging 调试
F8 | Step over | 跳过函数执行 |
F7 | Step into | 单步执行 |
Shift + F7 | Smart step into | 智能但不执行 |
Shift + F8 | Step out | 跳出函数执行 |
Alt + F9 | Run to cursor | 运行到光标处 |
Alt + F8 | Evaluate expression | |
F9 | Resume program | 继续执行 |
Ctrl + F8 | Toggle breakpoint | 切换断点 |
Ctrl + Shift + F8 | View breakpoints | 查看断点 |
Navigation 导航
Ctrl + N | Go to class | 查找/跳到类 |
Ctrl + Shift + N | Go to file | 查找文件 |
Ctrl + Alt + Shift + N | Go to symbol | 查找符号 |
Alt + Right/Left | Go to next/previous editor tab | |
F12 | Go back to previous tool window | |
Esc | Go to editor (from tool window) | |
Shift + Esc | Hide active or last active window | |
Ctrl + Shift + F4 | Close active run/messages/find/... tab | |
Ctrl + G | Go to line | |
Ctrl + E | Recent files popup | 最近打开的文件 |
Ctrl + Alt + Left/Right | Navigate back/forward | 回到上一步/下一步编辑的地方 |
Ctrl + Shift + Backspace | Navigate to last edit location | 回到最后编辑的地方 |
Alt + F1 | Select current file or symbol in any view | 在任意视图中选中当前文件或者符号 |
Ctrl + B or Ctrl + Click | Go to declaration | 到变量定义处 |
Ctrl + Alt + B | Go to implementation(s) | 到方法的实现处 |
Ctrl + Shift + I | Open quick definition lookup | 打开定义快速查找 |
Ctrl + Shift + B | Go to type declaration | 跳转到方法定义处 |
Ctrl + U | Go to super-method/super-class | 跳转到父方法/父类 |
Alt + Up/Down | Go to previous/next method | 跳转到上一个/下一个方法 |
Ctrl + ] / [ | Move to code block end/start | 跳到代码段的开始/结尾 |
Ctrl + F12 | File structure popup | 弹出文件结构视图 |
Ctrl + H | Type hierarchy | 类型的层次结构? |
Ctrl + Shift + H | Method hierarchy | 方法的层次结构? |
Ctrl + Alt + H | Call hierarchy | 调用的层次结构(查找方法/符号的调用方) |
F2 / Shift + F2 | Next/previous highlighted error | 下一个(上一个)高亮的错误 |
F4 / Ctrl + Enter | Edit source / View source | 编辑/查看文件源码 |
Alt + Home | Show navigation bar | 显示导航栏 |
F11 | Toggle bookmark | 增加书签 |
Ctrl + F11 | Toggle bookmark with mnemonic | 增加带符号的书签 |
Ctrl + #[0-9] | Go to numbered bookmark | 跳到标记数字的书签 |
Shift + F11 | Show bookmarks | 显示书签 |
Refactoring 代码重构
F5 | Copy | 复制 |
F6 | Move | 移动 |
Alt + Delete | Safe Delete | 安全删除 |
Shift + F6 | Rename | 重命名变量/方法名 |
Ctrl + F6 | Change Signature | 改变 |
Ctrl + Alt + N | Inline | |
Ctrl + Alt + M | Extract Method | |
Ctrl + Alt + V | Extract Variable | |
Ctrl + Alt + F | Extract Field | |
Ctrl + Alt + C | Extract Constant | |
Ctrl + Alt + P | Extract Parameter |
VCS/Local History 版本管理/本地历史
Ctrl + K | Commit project to VCS | |
Ctrl + T | Update project from VCS | |
Alt + Shift + C | View recent changes | 查看最近更改的内容 |
Alt + BackQuote (`) | ‘VCS’ quick popup |
Live Templates 动态模板
Ctrl + Alt + J | Surround with Live Template | 环绕的动态模板 |
Ctrl + J | Insert Live Template | 插入动态模板 |
iter | Iteration according to Java SDK 1.5 style | |
inst | Check object type with instanceof and downcast it | |
itco | Iterate elements of java.util.Collection | |
itit | Iterate elements of java.util.Iterator | |
itli | Iterate elements of java.util.List | |
psf | public static final | |
thr | throw new |
General 通用
Alt + #[0-9] | Open corresponding tool window | 打开相应的工具窗口 |
Ctrl + S | Save all | 保存 |
Ctrl + Alt + Y | Synchronize | 同步 |
Ctrl + Shift + F12 | Toggle maximizing editor | 最大化编辑窗口 |
Alt + Shift + F | Add to Favorites | 添加到Favorites |
Alt + Shift + I | Inspect current file with current profile | |
Ctrl + BackQuote (`) | Quick switch current scheme | |
Ctrl + Alt + S | Open Settings dialog | 打开设置窗口 |
Ctrl + Alt + Shift + S |
Open Project Structure dialog | 打开项目结构窗口 |
Ctrl + Shift + A | Find Action | 查找快捷键 |
Ctrl + Tab | Switch between tabs and tool window | 在选项卡和工具窗口之间切换 |
Here’s a list of tweaks you need to make with default system key bindings so that they won’t interfere with IntelliJ IDEA actions (listed in brackets).