1.自动代码
1.1.fori
1.2.sout
System.out.println();
1.3.快速删除掉没有使用的 import
Ctrl+Alt+O
1.4.Alt+Shift+S
实体类生成getter或者setter,相当于右键选择Generate
1.4.1.在一个普通的类上的效果
构造器:
1.4.2.在一个实体类上的效果
1.4.3.在一个测试类上的效果
1.5.psvm或者main
public static void main(String[] args) {
1.6.ctrl + z
撤销
1.7.ctrl + y
反撤销
1.8.alt+r
执行(run)
1.9.向下复制一行
Ctrl+Alt+down
1.10.删除一行
ctrl + d
1.11.向上或者向下移动一行
alt+down /up
1.12.向下开始新的一行
shift+enter
1.13.向上开始新的一行
ctrl+shift+enter
1.14.如何查看源码 (class)
ctrl + 选中指定的结构 或 ctrl + shift + t
1.15.万能解错/生成返回值变量
alt + enter
1.16.退回到前一个编辑的页面 (back)
alt + left
1.17.进入到下一个编辑的页面(针对于上条) (forward)
alt + right
1.18.查看继承关系(type hierarchy)
F4
1.19.idea格式化代码
ctrl+alt+L
1.20.重构:修改变量名与方法名(rename)
alt+shift+r
1.21.大写转小写/小写转大写(toggle case)
ctrl+shift+y
1.22.收起所有的方法(collapse all)
alt+shift+c
1.23.打开所有方法(expand all)
alt+shift+x
1.24.打开代码所在硬盘文件夹(show in explorer)
ctrl+shift+x
1.25.查找/替换(当前)
ctrl+f
1.26.查找(全局)
ctrl+h
1.27.查找文件
double Shift
1.28.查看类的继承结构图(Show UML Diagram)
ctrl + shift + u
1.29.添加到收藏(add to favorites)
ctrl+alt+f
1.30.打开收藏夹
alt+2
1.31.打开最近修改的文件(Recently Files)
ctrl+E
1.32.关闭当前的代码栏
ctrl+W
1.33.快速搜索类中的错误(next highlighted error)
ctrl + shift + q
1.34.选择要粘贴的内容(Show in Explorer)
ctrl+shift+v
1.35.查找方法在哪里被调用(Call Hierarchy)
ctrl+shift+h
1.36.生成 if(xxx = null)
ifn
1.37.切来切去
Ctrl+Tab
34.选择要粘贴的内容(Show in Explorer)
ctrl+shift+v
1.35.查找方法在哪里被调用(Call Hierarchy)
ctrl+shift+h
1.36.生成 if(xxx = null)
ifn
1.37.切来切去
Ctrl+Tab