| 功能 | 快捷键 |
|---|---|
| 查找快捷键[Find Action] | Windows : Ctrl + Shift + A macOS : Command + Shift + A |
显示一些有用信息
| 功能 | 快捷键 |
|---|---|
| 显示简要信息 | Windows : Ctrl + mouse over code macOS : Command + mouse over code |
| 快速查找文档[Quick Documention] | Windows : Ctrl + Q macOS : Ctrl + J |
| 在方法调用的地方显示参数信息 | Windows : Ctrl + P macOS : Command + P |
| 错误的显示说明[Error Description] | Windows : Ctrl + F1 macOS : Command + F1 |
编辑
| 功能 | 快捷键 |
|---|---|
| 格式化代码[Refomart Code] | Windows : Ctrl + Alt + L macOS : Command + Option + L |
| 清除无效引用包[Optimize Imports] | Windows : Ctrl + Alt + O macOS : Control + Option + O |
| 大小写切换[Toggle Case] | Windows : Ctrl + Shift + U macOS : |
| 重构-重命名[Rename] | Windows : Shift + F6 macOS : |
| 复制当前行或代码块[Duplicate Line or Block] | Windows : Ctrl + D macOS : Command + D |
| 删除当前行或代码块[Delete Line] | Windows : Ctrl + X(no selection), Ctrl + Y macOS : Command + Delete |
| 上移行[Move Line UP] | Windows : Alt + Shift + ↑ macOS : |
| 下移行[Move Line Down] | Windows : Alt + Shift + ↓ macOS : |
| 上移代码块[Move Statement UP] | Windows : Ctrl + Shift + ↑ macOS : |
| 下移代码块[Move Statement Down] | Windows : Ctrl + Shift + ↓ macOS : |
| 生成代码 | Windows : Alt + Insert(Alt + I) macOS : |
| 展示意向行动和快速修复[Show Intention Actions] | Windows : Alt + Enter macOS : |
代码补全
| 功能 | 快捷键 |
|---|---|
| 代码补全[CodeComplection-Basic] | Windows : Ctrl + Space macOS : |
| 代码智能补全,更精确的提示[CodeComplection-SmartType] | Windows : Ctrl + Shift + Space macOS : |
For循环的快速补全
| 功能 | 快捷键 |
|---|---|
| For each loop | Windows : [variable name].for macOS : |
| For i loop/i从小到大 | Windows : [variable name].fori macOS : |
| For i loop (reversed)/i从大到小 | Windows : [variable name].forr macOS : |
移动和选择
| 功能 | 快捷键 |
|---|---|
| 光标移到上个方法 | Windows : Alt + ↑ macOS : |
| 光标移到下个方法 | Windows : Alt + ↓ macOS : |
| 跳到前面的标签[Select Previous Tab] | Windows : Alt + ← macOS : |
| 跳到后面的标签[Select Next Tab] | Windows : Alt + → macOS : |
| 后退[Back] | Windows : Ctrl + Alt + ← macOS : |
| 前进[Forward] | Windows : Ctrl + Alt + → macOS : |
| 增加性的选择代码块 | Windows : Ctrl + W macOS : |
| 递减性的选择代码块 | Windows : Ctrl + Shift + W macOS : |
导航
| 功能 | 快捷键 |
|---|---|
| 转到声明[Declaration] | Windows : Ctrl + B, Ctrl + Click macOS : |
| 转到实现[Implementation(s)] | Windows : Ctrl + Alt + B, Ctrl + Alt + Click macOS : |
| 打开类[Open Class] | Windows : Ctrl + N macOS : |
| 打开文件[Open File] | Windows : Ctrl + Shift + N macOS : |
| 快速查找类中的方法和成员变量等[File Structure] | Windows : Ctrl + F12 macOS : Commond + F12 |
查找替换
| 功能 | 快捷键 |
|---|---|
| 查找[Find] | Windows : Ctrl + F macOS : |
| 替换[Replace] | Windows : Ctrl + R macOS : |
| 查找下一个[Find Next] | Windows : F3 macOS : |
| 查找前一个[Find Previous] | Windows : Shift + F3 macOS : |
| 指定查找[Find in Path] | Windows : Ctrl + Shift + F macOS : |
| 指定替换[Replace in Path] | Windows : Ctrl + Shift + P macOS : |
| 全局查找 | Windows : Double Shift macOS : |
| 查找被引用的地方[Find Usages] | Windows : Alt + F7 macOS : |
| 在本文件中查找被引用的地方[Find Usages in File] | Windows : Ctrl + F7 macOS : |
| 显示被引用的地方[Show Usages] | Windows : Ctrl + Alt + F7 macOS : |
| 在本文件中显示被引用的地方[Highlight Usages in File] | Windows : Shift + Ctrl + F7 macOS : |
其它
| 功能 | 快捷键 |
|---|---|
| 打开相应的工具窗口 | Windows : Alt + #[0-9] macOS : |
| 转到编辑器(从工具窗口) | Windows : ESC macOS : |
| 标签和工具窗口之间切换 | Windows : Ctrl + Tab macOS : |