多用用Eclipse的快捷键

    做Java开发,首选IDE当然是Eclipse,其提供的快捷键则充当了程序员的瑞士军刀。远离鼠标,多用用Hot-Key,通过保持专注来提高编码效率。在stackoverflow网站上有一篇主题帖分享了大家最喜爱的Eclipse快捷键What is your favorite hot-key in Eclipse?

    下面对这些快捷键做一番整理。
快捷键一览表:
  • Ctrl+Shift+L - Gives a quick reference of Eclipse Hotkeys (at least in Galileo) (不记得下面的这些快捷键,应多使用该方法调出快捷键一览表)
编辑相关:
  • Alt+/ - auto complete. Completes everything. (补齐方法名、变量名、类名)
  • Ctrl+/ - comment/uncomment selected lines (添加注释)
  • Alt+Shift+R - rename selection  (重命名)
  • Ctrl+Shift+F to format code (编码格式化)
  • Ctrl+M - Maximize Page (最大化页面)
  • Ctrl+Q - return to last edit location (回到上一次编辑位置)
错误检查:
  • Ctrl+1 - suggestions and quick fixes. (提供快速的除错建议)
  • Ctrl+Shift+O - organise imports (removes unused imports, adds missing imports, sorts imports)  (快速导入依赖的包)
  • Ctrl+Shift+M - Add Import. Love to see those red underlines disappear. (感觉Ctrl+Shift+O更好用)
源码阅读:
  • F3 - Open definition: jumps to the definition of the class, method, variable, even if it is in remote places (such as classes in the JDK itself) (跳到类、方法等的定义处)
  • F4 - Open Type Hierarchy (打开类的继承结构图)
  • Ctrl+O (not zero, but the vocal) - Shows the outline of the document (显示Outline视图)
  • Ctrl+T: Once will give you supertypes, twice should give you interfaces as well. (点一次显示超类,点两次显示接口)
  • Ctrl+F3 - (once - Show class methods and variables)  (点击一次,显示该类的方法和变量)
  • Ctrl+F3   - (Hit this hot key combo twice to see inherited members and methods) (点击两次,显示继承的方法和变量)
导航相关:
  • Ctrl + Shift + T - find as you type for Java classes in your projects (当你只记得类的首字母时,可以快速查找某一个类)
  • Ctrl+Shift+R - find as you type for all resources in your projects (通过首字母快速查找所有的资源:图片、java文件等)
  • Alt+Left - step backwards through editing history (回到上一次编辑历史)
  • Alt+Right - step forwards through editing history   (回到下一次编辑历史)
编译运行相关:
  • Ctrl +F11 - run again  (运行)
  • F11 - run again in debug mode (调试模式运行)

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值