eclipse快捷键
Eclipse is one of the most widely used IDE for Java developers. I have been using it for more than 10 years and there are so many shortcuts that can help you in development by saving time.
Eclipse是Java开发人员使用最广泛的IDE之一。 我使用它已有10多年了,有许多捷径可以通过节省时间来帮助您进行开发。
Eclipse快捷键 (Eclipse Shortcuts)
I am using Eclipse on Mac and Windows system. Here I am providing the most widely used Eclipse shortcut commands.
我在Mac和Windows系统上使用Eclipse。 在这里,我提供了使用最广泛的Eclipse快捷方式命令。
Note that these shortcuts are for Eclipse Juno, so some of them might not work for other Eclipse versions.
请注意,这些快捷方式适用于Eclipse Juno,因此其中一些可能不适用于其他Eclipse版本。
Shortcut Key Mac | Shortcut Key Windows | Description |
---|---|---|
Command + 3 | Ctrl + 3 | It puts the focus into Quick Access search box. |
Command + S | Ctrl + S | Save current editor |
Command + 1 | Ctrl + 1 | Quickfix for errors and warnings, depends on the cursor position |
Control + Space | Ctrl + Space | Content assist and code completion |
Command + Shift + F | Ctrl + Shift + F | Format source code |
Control + Q | Ctrl + Q | Moves cursor to the last edited position |
Command + D | Ctrl + D | Deletes current line in the editor |
Command + Shift + O | Ctrl + Shift + O | Organize imports in the current java file |
Command + 2 + L | Ctrl +2 + L | Assign statement to new local variable |
Command + 2 + F | Ctrl + 2 + F | Assign statement to a field |
Command + O | Ctrl + O | Shows quick outline of the java class |
Command + fn + F11 | Ctrl + F11 | Runs the current opened java class if main method exists or else run the last launched application |
Command + Shift + R | Ctrl + Shift + R | Open / Search for resources |
Command + Shift + T | Ctrl + Shift + T | Open / Search for types, very useful in finding classes |
Command + E | Ctrl + E | To select an editor from the currently open editors |
Command + fn + F8 | Ctrl + F8 | Shortcut for switching perspectives |
Command + [ or Command + ] | Alt + ← or Alt + → | Go to previous/ next editor position in history |
Fn + F3 | F3 | Move cursor to the declaration of the variable |
Command + Shift + P | Ctrl + Shift + P | Move cursor to the matching bracket |
Command + . | Ctrl + . | Go to the next problem |
Command + Shift + . | Ctrl + , | Go to the previous problem |
Fn + F4 | F4 | Show type hierarchy of the variable |
Command + K | Ctrl + K | Find next for search text in the opened editor |
Command + Shift + G | Ctrl + Shift + G | Search for references in the workspace |
Command + T | Ctrl + T | Shows type hierarchy of the current java class |
Command + M | Ctrl + M | Maximize Java editor |
Fn + Shift + F2 | Shift + F2 | Shows the javadoc of the method, class |
Command + Option + R | Alt + Shift + R | Rename of package, class etc |
Command + Option + T | Alt + Shift + T | Opens the quick refactoring menu |
快捷键Mac | 快捷键窗口 | 描述 |
---|---|---|
Command + 3 | Ctrl + 3 | 它将焦点置于“快速访问”搜索框中。 |
Command + S | Ctrl + S | 保存当前编辑器 |
Command + 1 | Ctrl + 1 | 错误和警告的快速修复,取决于光标位置 |
控制+空间 | Ctrl +空格 | 内容协助和代码完成 |
Command + Shift + F | Ctrl + Shift + F | 格式化源代码 |
控制+ Q | Ctrl + Q | 将光标移动到最后编辑的位置 |
Command + D | Ctrl + D | 在编辑器中删除当前行 |
Command + Shift + O | Ctrl + Shift + O | 在当前的Java文件中组织导入 |
Command + 2 + L | Ctrl +2 + L | 将语句分配给新的局部变量 |
Command + 2 + F | Ctrl + 2 + F | 将语句分配给字段 |
Command + O | Ctrl + O | 显示Java类的快速概述 |
Command + Fn + F11 | Ctrl + F11 | 如果存在main方法,则运行当前打开的java类,否则运行最后启动的应用程序 |
Command + Shift + R | Ctrl + Shift + R | 打开/搜索资源 |
Command + Shift + T | Ctrl + Shift + T | 打开/搜索类型,在查找类中非常有用 |
Command + E | Ctrl + E | 从当前打开的编辑器中选择一个编辑器 |
Command + Fn + F8 | Ctrl + F8 | 切换视角的快捷方式 |
Command + [或Command +] | Alt +←或Alt +→ | 转到历史记录中的上一个/下一个编辑器位置 |
Fn + F3 | F3 | 将光标移到变量的声明 |
Command + Shift + P | Ctrl + Shift + P | 将光标移到匹配的括号 |
Command +。 | Ctrl +。 | 转到下一个问题 |
Command + Shift +。 | Ctrl +, | 转到上一个问题 |
Fn + F4 | F4 | 显示变量的类型层次 |
Command + K | Ctrl + K | 在打开的编辑器中查找下一个搜索文本 |
Command + Shift + G | Ctrl + Shift + G | 在工作空间中搜索引用 |
Command + T | Ctrl + T | 显示当前java类的类型层次结构 |
Command + M | Ctrl + M | 最大化Java编辑器 |
Fn + Shift + F2 | Shift + F2 | 显示方法的Javadoc,类 |
Command + Option + R | Alt + Shift + R | 重命名包,类等 |
Command + Option + T | Alt + Shift + T | 打开快速重构菜单 |
These are the most useful eclipse shortcuts that I use every day to save time. If you know any other shortcuts please let us know through comments.
这些是我每天用来节省时间的最有用的Eclipse快捷方式。 如果您知道其他快捷方式,请通过评论告知我们。
eclipse快捷键