idea 个人常用快捷键

windows系统

普通快捷键

ctrl +f12 查看当前类的所有方法
ctrl + e 查看最近的文件
按住alt移动鼠标进行选中 列编辑
生成方法 alt + insert
选中相同代码片段 ctrl + g

重构相关

ctrl + alt + v 提取变量
ctrl + alt + c  提取常量
shift + f6 更改名字
在方法上 f6 将方法重构至别的类
ctrl + alt + shift + t  
在类名上 alt + enter 快速创建测试类
ctrl + alt + p 将变量放至方法参数
ctrl + alt + f 提升变量至成员变量

mac系统

普通快捷键

全局搜索 command + shift + r
查看当前类所有方法 command + f12
查看最近文件 command + e
列编辑 按住option然后鼠标选中
生成方法 command + n
执行所有的测试 control + shift + r
显示参数信息 command + p
格式化代码 command + option + l
选中相同代码片段 control + g

重构相关快捷键

提取变量 command + option + v
提取常量 command + option + c
提取变量至成员变量 command + option + f
将变量放至方法参数 command + option + p
更改变量名 shift + f6
提取方法 command + option + m
inline方法 command + option + n
将方法重构至别的类 在方法名f6
将代码包裹在块内 command + option + t
posted @ 2023-01-28 11:19  艾尔夏尔-Layton  阅读(116)  评论(0编辑  收藏  举报