IDEA系列教程06_IDEA快捷键

1.设置快捷键风格

IDEA系列教程06_IDEA快捷键
**注意:**IDEA是一个相对年轻的软件,考虑开发者已经适应了其他软件的快捷键。所以它的快捷键也支持其他软件的快捷键。但是并不是100%一致。

2.修改快捷键

IDEA系列教程06_IDEA快捷键

3.常用快捷键

快捷键 说明
alt+enter 提示补全 (Class Name Completion)
ctrl + / 单行注释
ctrl + shift + / 多行注释
Ctrl+d 向下复制一行 (Duplicate Lines)
ctrl+y 删除一行或选中行 (delete line)
alt+shift+down 向下移动行(move statement down)
alt+shift+up 向上移动行(move statement up)
ctrl + 选中指定的结构 如何查看源码 (class)
alt + enter 万能解错/生成返回值变量
alt + left 退回到前一个编辑的页面 (back)
alt + right 进入到下一个编辑的页面(针对于上条) (forward)
F4 查看继承关系(type hierarchy)
Ctrl + Alt + L 格式化代码(reformat code)
Ctrl + P 提示方法参数类型(Parameter Info)
ctrl + c 复制代码
Ctrl+D 复制所在行
ctrl + z 撤销
Ctrl + Shift + Z 反撤销
ctrl + x 剪切
ctrl + v 粘贴
ctrl + s 保存
ctrl + a 全选
Alt + 7 查看类的结构:类似于 eclipse 的 outline
alt+shift+r 重构: 修改变量名与方法名(rename)
Ctrl + Shift + U 大写转小写/小写转大写(toggle case)
alt +insert 生成构造器/get/set/toString
alt + shift + c 收起所有的方法(collapse all)
alt+shift+x 打开所有方法(expand all)
ctrl+shift+x 打开代码所在硬盘文件夹(show in explorer)
alt+shift+z 生成 try-catch 等(surround with)
alt+shift+f 局部变量抽取为成员变量(introduce field)
ctrl+f 查找/替换(当前)
ctrl+h 查找(全局)
double Shift 查找文件
ctrl + shift + u 查看类的继承结构图(Show UML Diagram)
ctrl+alt+h 查看方法的多层重写结构(method hierarchy)
ctrl+alt+f 添加到收藏(add to favorites)

ps:如需最新的免费文档资料和教学视频,请添加QQ群(627407545)领取。