IDEA的常用快捷键设置
公司用的eclipse实在是不方便,决定还是换回IDEA,为一劳永逸,特意定义一套自己的快捷键,方便下次配置环境快速导入设置
基本
-
执行(run) alt + r
-
提示补全(class name completion) alt + /
-
单行注释 ctrl + /
-
多行注释 ctrl + shift + /
-
向下复制一行(duplicate lines) ctrl + down
-
删除一行(delete line) ctrl + d
-
向下移动行(move statement down) alt +down
-
向上移动一行(move statement up) alt + up
-
向下开始新的一行(start new line) shift +enter
-
向上开始新的一行(start new line before current) ctrl + shift + enter
-
万能解错/生成返回变量 alt + enter
-
查看继承关系(type hirearchy) ctrl + t
常用
- 格式化代码(reformat code) ctrl + shift + f
- 提示方法参数类型(parameter info) ctrl + alt + /
- 查看类的结构(属性方法等) ctrl + o
- 重构:修改变量名与方法名(rename) ctrl + r
- 生成get/set/toString/构造方法 alt + shift + s
- 查看文档说明(quick documentation) F2/ctrl + q
- 收起所有方法(collapse all) alt + c
- 展开所有方法(expand all) alt + e
- 打开代码所在文件夹(show in explorer) ctrl + shift + x
- 生成try catch (surround with) alt + shift + z
- 查找 ctrl + f
- 查看类的继承结构图(show uml diagram) ctrl + shift + u
- 抽取方法 (extra method) alt + shift + m
- 关闭当前打开的代码栏(close) ctrl + w
- 关闭打开的所有代码栏(close all) ctrl + shift + w
- 查找方法在哪里被调用(call hierarchy) ctrl+ alt+ h