【干货】IDEA小白之IDEA使用总结_慕课手记

创建时间:2017/8/25 9:39
来源:http://www.imooc.com/article/3003


  • alt + insert:获取get、set方法快捷键
  • alt + enter:导包
  • ctrl + shift + enter:语句完成(自动跳出本行)
  • ctrl + shift + e:查看最近更改的文件(历史记录)
  • ctrl +f12:显示当前文件的结构
  • ctrl + f7:查询当前元素在当前文件中的引用,然后按 F3 可以选择
  • ctrl + n:快速打开类(eclipse中的ctrl shift r)
  • ctrl + shift + n:快速打开文件(感觉和上面的一样,没啥区别)
  • alt + q:看到当前方法的声明
  • ctrl + shift + insert:选择剪贴板内容并插入(超赞)
  • ctrl + alt + t:把代码包在一个块内(例如:try/catch、if..)
  • ctrl + alt + l:格式化代码(eclipse中的ctrl shift f)
  • ctrl + alt + o:优化导入的类和包
  • ctrl + r:替换文本
  • ctrl + f:查找文本
  • ctrl + shift + space:自动补全代码
  • ctrl + shift + alt + n:查找类中的方法或变量
  • alt + shift + c:最近的更改
  • alt + shift + ↑/↓:上/下移一行
  • shift + f6:重构 - 重命名
  • ctrl + x:删除行
  • ctrl + d:复制行
  • ctrl + j:自动代码(例如:serr)
  • ctrl + alt + left/right:返回至上次浏览的位置
  • alt + left/right:切换代码视图