IDEA快捷键,Mac、Windows和Linux对照
Remember these Shortcuts
记住这些快捷键
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Smart code completion | 智能代码补全 | ⌃⇧Space | Ctrl + Shift + Space |
| Search everywhere | 搜索所有文件 | Double⇧ | Double Shift |
| Show intention actions and quick-fixes | 显示意向操作和快捷修复 | ⌘↩︎ | Alt + Enter |
| Generate code | 生成代码 | ⌘N,⌃↩︎ | Alt + Ins |
| Extend selection | 展开选择 | ⌥⌘↑ | Ctrl + W |
| Shrink selection | 收起选择 | ⌥⌘↓ | Ctrl + Shift + W |
| Recent files popup | 最近打开的文件 | ⌘E | Ctrl + E |
| Rename | 重命名 | ⇧F6 | Shift + F6 |
General
常规
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Open corresponding tool window | 打开相应的工具窗口 | ⌘0…⌘9 | Alt + #[0-9] |
| Save all | 保存所有 | ⌘S | Ctrl+S |
| Synchronize | 同步 | ⌘⌥Y | Ctrl+Alt+Y |
| Toggle maximizing editor | 切换最大化编辑窗口 | ⌘⇧F12 | Ctrl + Shift + F12 |
| Inspect current file with current profile | 用当前配置文件检查当前文件 | ⌥⇧I | Alt+Shift+I |
| Quick switch current scheme | 快速切换当前方案 | ⌃§,⌃| Ctrl + BackQuote () |
|
| Open Settings dialog | 打开设置弹框 | ⌘, | Ctrl + Alt + S |
| Open Project Structure dialog | 打开项目结构弹框 | ⌘; | Ctrl + Alt + Shift + S |
| Find Action | 找到行动 | ⌘⇧A | Ctrl + Shift + A |
Debugging
调试
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Step over / into | 单步退出或进入 | F8 / F7 | F8/F7 |
| Smart step into / Step out | 智能单步进入或退出 | ⇧F7/⇧F8 | Shift+F7/Shift+ F8 |
| Run to cursor | 运行到下一行 | ⌥F9 | Alt+F9 |
| Evaluate expression | 计算表达式 | ⌥F8 | Alt+F8 |
| Toggle breakpoint | 执行到下一个断点 | ⌘F8 | Ctrl + F8 |
| View breakpoints | 查看所有断点 | ⌘⇧F8 | Ctrl + Shift + F8 |
Search / Replace
查找/替换
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Search everywhere | 搜索所有文件 | Double⇧ | Double Shift |
| Find | 查找 | ⌘F | Ctrl + F |
| Find next / previous | 查找下一个/上一个 | ⌘G/⌘⇧G | F3/Shift+F3 |
| Replace | 替换 | ⌘R | Ctrl+R |
| Find in path | 在指定路径查找 | ⌘⇧F | Ctrl+Shift+F |
| Replace in path | 在指定路径替换 | ⌘⇧R | Ctrl+Shift+R |
| Select next occurrence | 选择下一个发生 | ⌃G | Alt+J |
| Select all occurrences | 选择所有的发生 | ⌃⇧G | Ctrl+Alt+Shift+J |
| Unselect occurrence | 取消选择 | ⌃G | Alt+Shift+J |
Editing
编辑
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Basic code completion | 基本代码补全 | ⌃Space | Ctrl + Space |
| Smart code completion | 智能代码补全 | ⌃⇧Space | Ctrl + Shift + Space |
| Complete statement | 完整的声明 | ⌘⇧↩︎ | Ctrl + Shift + Enter |
| Parameter info (within method call arguments) | 参数说明-在方法调用参数中 | ⌘P | Ctrl+P |
| Quick documentation lookup | 快速查找文档 | ⌃J, | Ctrl+Q |
| External Doc | 外部文档 | ⌘F1 | Shift + F1 |
| Brief Info | 简要信息 | ⌘+mouse | Ctrl + mouse |
| Show descriptions of error at caret | 在插入符号处显示错误的描述 | ⌘F1 | Ctrl + F1 |
| Generate code... | 生成代码 | ⌘N,⌃↩︎ | Alt + Insert |
| Override methods | 覆盖方法 | ⌃O | Ctrl + O |
| Implement methods | 实现方法 | ⌃I | Ctrl + I |
| Surround with... | 被XXX包含 | ⌘⌥T | Ctrl + Alt + T |
| Comment / uncomment with line comment | 注释/取消行注释 | ⌘/ | Ctrl + / |
| Comment / uncomment with block comment | 注释/取消块注释 | ⌘⌥/ | Ctrl+Shift+/ |
| Extend selection | 展开选择 | ⌥↑ | Ctrl + W |
| Shrink selection | 收起选择 | ⌥↓ | Ctrl + Shift + W |
| Context info | 上下文信息 | ⌃⇧Q | Alt + Q |
| Show intention actions and quick-fixes | 显示意向操作和快捷修复 | ⌘↩︎ | Alt + Enter |
| Reformat code | 重新格式化代码 | ⌘⌥L | Ctrl + Alt + L |
| Optimize imports | 优化导入 | ⌃⌥O | Ctrl + Alt + O |
| Auto-indent line(s) | 自动缩进 | ⌃⌥I | Ctrl + Alt + I |
| Indent / unindent selected lines | 增加/减小缩进 | ⇥/⇧⇥ | Tab / Shift + Tab |
| Cut current line to clipboard | 剪切当前行 | ⌘X | Ctrl + X , Shift + Delete |
| Copy current line to clipboard | 复制当前行 | ⌘C | Ctrl + C , Ctrl + Insert |
| Paste from clipboard | 粘贴 | ⌘V | Ctrl + V , Shift + Insert |
| Paste from recent buffers... | 从最近的缓冲区粘贴 | ⌘⇧V | Ctrl + Shift + V |
| Duplicate current line | 快速复制并粘贴当前行 | ⌘D | Ctrl + D |
| Delete line at caret | 删除选中的行 | ⌘⌫ | Ctrl + Y |
| Smart line join | 智能组合行 | ⌃⇧J | Ctrl + Shift + J |
| Smart line split | 智能拆分行 | ⌘↩︎ | Ctrl + Enter |
| Start new line | 开始新的一行 | ⇧↩︎ | Shift + Enter |
| Toggle case for word at caret or selected block | 在插入符号或选择块上切换单词大小写 | ⌘⇧U | Ctrl+Shift+U |
| Select till code block end / start | 选择直到代码块的结束/开始 | ⌘⇧]/⌘⇧[ | Ctrl+Shift+]/[ |
| Delete to word end | 删除到单词的结尾 | ⌥⌦ | Ctrl + Delete |
| Delete to word start | 删除到单词的开始 | ⌥⌫ | Ctrl + Backspace |
| Expand / collapse code block | 展开/折叠代码块 | ⌘+/⌘- | Ctrl + NumPad+ / - |
| Expand all | 展开所有 | ⌘⇧+ | Ctrl + Shift + NumPad+ |
| Collapse all | 折叠所有 | ⌘⇧- | Ctrl + Shift + NumPad- |
| Close active editor tab | 关闭活动编辑页 | ⌘W | Ctrl + F4 |
Refactoring
重构
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Copy | 复制 | F5 | F5 |
| Move | 移动 | F6 | F6 |
| Safe Delete | 安全删除 | ⌘⌫ | Alt + Delete |
| Rename | 重命名 | ⇧F6 | Shift + F6 |
| Refactor this | 重构当前 | ⌃T | Ctrl+Alt+Shift+T |
| Change Signature | 更改签名 | ⌘F6 | Ctrl + F6 |
| Inline | 内联 | ⌘⌥N | Ctrl+Alt+N |
| Extract Method | 提取方法 | ⌘⌥M | Ctrl + Alt + M |
| Extract Variable | 提取变量 | ⌘⌥V | Ctrl + Alt + V |
| Extract Field | 提取自断 | ⌘⌥F | Ctrl+Alt+F |
| Extract Constant | 提取常量 | ⌘⌥C | Ctrl+Alt+C |
| Extract Parameter | 提取参数 | ⌘⌥P | Ctrl+Alt+P |
Navigation
导航
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Go to class | 去到到某个类 | ⌘O | Ctrl + N |
| Go to file | 去到到某个文件 | ⌘⇧O | Ctrl+Shift+N |
| Go to symbol | 去到某个符号 | ⌘⌥O | Ctrl+Alt+Shift+N |
| Go to next / previous editor tab | 去到前/后一个标签页 | ⌃←/⌃→ | Alt + Right/Left |
| Go back to previous tool window | 返回前一个工具窗口 | F12 | Alt + Right/Left |
| Go to editor (from tool window) | 转到编辑器(从工具窗口) | ⎋ | Esc |
| Hide active or last active window | 隐藏活动或上一个活动窗口 | ⇧⎋ | Shift + Esc |
| Go to line | 去到某一个行 | ⌘L | Ctrl + G |
| Recent files popup | 最近打开的文件 | ⌘E | Ctrl + E |
| Navigate back / forward | 导航后退/前进 | ⌘⌥←/→ | Ctrl + Alt + Left/Right |
| Navigate to last edit location | 导航到最后一个编辑的位置 | ⌘⇧⌫ | Ctrl + Shift + Backspace |
| Select current file or symbol in any view | 在任何视图中选择当前文件或符号 | ⌥F1 | Alt + F1 |
| Go to declaration | 去到声明的位置 | ⌘B/⌘Click | Ctrl + B , Ctrl + Click |
| Go to implementation(s) | 去到实现的类 | ⌘⌥B | Ctrl + Alt + B |
| Open quick definition lookup | 打开快速定义查找 | ⌥Space/⌘Y | Ctrl + Shift + I |
| Go to type declaration | 去到类型声明 | ⌃⇧B | Ctrl+Shift+B |
| Go to super-method / super-class | 去到父方法/类 | ⌘U | Ctrl+U |
| Go to previous / next method | 去到下一个/上一个方法 | ⌃↑/↓ | Alt + Up/Down |
| Move to code block end / start | 移动到代码块结束/开始 | ⌘]/⌘[ | Ctrl + ]/[ |
| File structure popup | 弹出文件结构 | ⌘F12 | Ctrl + F12 |
| Type hierarchy | 类型层次 | ⌃H | Ctrl+H |
| Method hierarchy | 方法层次 | ⌘⇧H | Ctrl+Shift+H |
| Call hierarchy | 调用层次 | ⌃⌥H | Ctrl+Alt+H |
| Next / previous highlighted error | 下一个/上一个高亮错误 | F2/⇧F2 | F2/Shift+F2 |
| Edit source / View source | 编辑/查看源文件 | F4/⌘↓ | F4 / Ctrl + Enter |
| Show navigation bar | 显示导航栏 | ⌥Home | Alt + Home |
| Toggle bookmark | 切换书签 | F3 | F11 |
| Toggle bookmark with mnemonic | 用助记符切换书签 | ⌥F3 | Ctrl + F11 |
| Go to numbered bookmark | 转到对应编号书签 | ⌃0…⌃9 | Ctrl + #[0-9] |
| Show bookmarks | 显示书签 | ⌘F3 | Shift + F11 |
Compile and Run
编译和运行
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Make project | 编译项目 | ⌘F9 | Ctrl + F9 |
| Compile selected file, package or module | 编译选中的文件/包/模块 | ⌘⇧F9 | Ctrl + Shift + F9 |
| Select configuration and run / debug | 选中配置并运行/调试 | ⌃⌥R/D | Alt + Shift + F10/F9 |
| Run/Debug | 运行/调试 | ⌃R/D | Shift+F10/F9 |
| Run context configuration from editor | 从编辑器运行上下文配置 | ⌃⇧R/D | Ctrl + Shift + F10 |
Usage Search
用法搜索
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Find usages / Find usages in file | 查找用法/查找文件中的用法 | ⌥F7/⌘F7 | Alt + F7 / Ctrl + F7 |
| Highlight usages in file | 高亮使用的文件 | ⌘⇧F7 | Ctrl + Shift + F7 |
| Show usages | 显示用法 | ⌘⌥F7 | Ctrl + Alt + F7 |
VCS / Local History
版本控制/本地历史
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Commit project to VCS | 提交项目到版本控制 | ⌘K | Ctrl + K |
| Update project from VCS | 从版本控制更新项目 | ⌘T | Ctrl + T |
| Push commits | 推送提交 | ⌘⇧K | Ctrl + Shift + K |
| ‘VCS’ quick popup | 快速弹出版本控制 | ⌃V | Alt + BackQuote (`) |
Live Templates
实时模版
| En | CN | MAC | Win,Linux |
|---|---|---|---|
| Surround with Live Template | 环绕实时模版 | ⌘⌥J | Ctrl+Alt+J |
| Insert Live Template | 插入实时模版 | ⌘J | Ctrl+J |