Eclipse shortcuts use summaries

  • 2020-04-01 02:11:16
  • OfStack

Most commonly used
1. Alt + /
As a content assist clew, estimates that no one need not, of course, it can also be used to do some quick input, such as a beginner in most System. Out. The println (), as long as the input syso and then press the key combination, is done automatically and set the cursor to the brackets, actually some of the commonly used some structure can use this method to input, such as for, try... Catch, etc., as long as it is defined in the preference, Java, editor, template.

Ctrl + Shift + O
Quickly and automatically import the required packages.

Ctrl + D
Deletes the current line or selects the line.

Ctrl + /
Comment/uncomment the current line or selected line with a single line comment. It is not uncommon for some code to be temporarily closed in a debugger, so it is still quite common. Similar shortcuts include Ctrl + sift + / and Ctrl + sift + \, which comment or cancel the selected part with multiple lines.

Editing shortcuts are not commonly used
1,   Ctrl + Shift + up/down
Copy the current line or select the line to the previous/next line.

2,   Alt + up/down
Switch between the current line and the previous/next line, and with the previous set of shortcuts you'll find it easy to copy and paste code.

3,   Shift + Enter/Ctrl + Shift + Enter
Insert a blank line in the next/previous line of the current line and move the cursor to the newly inserted line.

4,   Ctrl + M
Maximize/unmaximize the current window, when the code is relatively long it is very convenient to use it, do not need to switch the mouse double click so troublesome.

5,   Alt + Shift + R
It is useful to modify the variable or method name where the current cursor is located, and to automatically modify all references.

Location shortcuts are not commonly used
1,   Ctrl + K/Ctrl + Shift + K
Quickly look back/forward in the current document for the selected content, although Ctrl + F is also possible, but this is more convenient.

2,   Alt + left/Alt + right
Back/forward to the last code location, this group is usually handy when you look at the code, jump several classes or methods in a row, and want to go back.

3,   Ctrl + Shift + T
Open the type, open the classes in the JDK to see the source code.

4,   Ctrl + Shift + G
You can see where the class, method, or property that the cursor is in is referenced, which is rarely used at the moment because the code structure is simple, but will be useful in the future.

Technical shortcuts that are not commonly used
1. Alt + Shift + S: open the reconstruction right-click menu and generate getter/setter methods, constructor methods, and toString() methods
Alt + Shift + Z: put the selected code into while, for, try... In a structure like catch
3, Ctrl + F6/Ctrl + Shift + F6/Ctrl + E switch to the previous/next editor or list the editor display card
4. F3 can quickly locate the class, method and property of the cursor position
5. F4 displays the inheritance relation of the current class, and opens the class inheritance view (or similar Ctrl + T to quickly display the inheritance relation of the current class).
6, Ctrl + Q to the last edit position


Related articles: