导航栏
Navigate
- Type Hierarchy
- Method Hierarchy
- Main Menu | Navigate | Next Highlighted Error
2. 快捷键
- 万能键
⌥ Enter
- 按照 80/20 原则,只有 20% 是常用的
2.1 高频
Description | keywords | Description |
---|---|---|
Go to Class... | ⌘O | search class |
Generate... | ⌘N | |
Implement Methods... | ⌃ I | |
Override Methods... | ⌃ O | |
Quick Definition | ⌘ Y | |
Optimize Imports | ⌃ ⌥ O | |
File Structure | ||
Parameter Info | ⌘P |
2.2 常规
Description | keywords | Description |
---|---|---|
Find in Files... | ⇧ ⌘ F | |
Toggle Case | ⌘ ⇧ U | |
Go to Line:Column... | ⌘L | |
Reformat Code | ⌥⌘L | |
Copy Reference | ⇧⌥⌘C | |
Complete Current Statement | ⇧⌘Enter | |
Move Caret to Matching Brace | ⌃M | |
Rollback | ⌥⌘Z | |
Select Previous/Next Tab | ⌥ ⇧←/ → | |
Expand / collapse | ⌘ + / - ; ⇧⌘ + / - | |
Rebuild | ⇧⌘F9 | |
Find Next / Move to Next Occurrence | ⌘G | |
Comment with Block Comment | ⌥⌘/ | |
Surround With... | ⌥⌘T | |
Recent Files | ⌘E | |
Next Method | ||
----------------custom-------------- | ||
Close Other Tabs | ⌃⌘1 | |
Git > Annotate | ⌃⌘2 | |
Git > Show History | ⌃⌘3 | |
Java Class | ⌃⌘C |
3. 自定义快捷键

4. 常用操作
- 自动补全
- 查看类中类 Quick Definition ⌘Y
- 查看方法的参数 Parameter Info ⌘P
4.1 搜索
Help > Find Action ,IDEA 把所有操作定义为一个Action

搜索文件或文件夹

4.2 查看文件结构
- File Structure

4.3 定位错误位置

4.4 查看实现类
4.5 代码纠错

4.6 提取字符串的值
当字符串太多,有换行时,复制出来不方便,将光标置于字符串的值处,然后按 Option + Enter
,选择 Copy String Concatenation Text to the Clipboard
important
- debug模式,idea不会自动编译类,每次改动的类用
Ctrl/cmd + Shift + F9
重新编译
方法或变量引用(包括调用次数)
-
Alt + F7
方法或变量引用 Ctrl + Alt + F7
-
Ctrl + Alt + H
方法引用(没有变量) -
Ctrl+Alt+H
-> Enter 直接上下键 -
Ctrl+Alt+H
->F4
看源码 ->Alt+8
可以跳回去
Operation
-
Ctrl + U
跳到父类接口(或点击方法前面的小图标) -
Ctrl + Shift + F7
可以高亮某个变量,而且随着鼠标的移动,这个高亮是不会消失的(这个很重要)。然后使用F3
找到下一个使用该变量的地方 -
Ctrl + Shift + N
,使用/,然后输入目录名字即可
网友评论