Eclipse shortcut Key Usage Summary

Source: Internet
Author: User

Eclipse is an essential tool for Java peers, summarizing its shortcut keys, too commonly used CTRL + click, Ctrl+shift+f, ctrl+1, etc. i will not elaborate, mainly for the convenience of viewing. Here's a detailed introduction to you

Most common practical
1, Alt +/
As a content assist hint, estimated that no one, of course, it can also be used to do some quick input, such as beginners with the most System.out.println (), as long as the input syso and then press this key combination, automatically complete and the cursor is positioned in parentheses, In fact, some of the commonly used structures can be entered in this way, such as for, try ... catch and so on, as long as it is defined in the preference–java–editor–template can be used this way.

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

3, Ctrl + D
Deletes the current row or the selected row.

4, Ctrl +/
With a single-line comment/Uncomment the current line or select a line, the debugger will inevitably temporarily close some code, so its usage rate is still very high. Similar shortcut keys include CTRL + SIFT +/and CTRL + SIFT + \ This pair, with multiple lines of comments or cancellations in the selected section.

Useful non-trivial edit shortcut keys
1. Ctrl + Shift + UP ARROW/down ARROW
Copy the current line or select a line to the previous line/next row method.

2. Alt + UP ARROW/down ARROW
Let the current line and the previous line/next line swap positions, combined with the previous set of shortcut keys you will find it very convenient to copy and paste the code.

3, SHIFT + Enter/ctrl + SHIFT + Enter
Inserts a blank line on the next line/previous line of the current row and moves the cursor to the newly inserted row.

4, Ctrl + M
Maximize/Cancel maximize the current window, when the code is relatively long use it is very convenient, no longer switch the mouse double-click so troublesome.

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

Infrequently used positioning shortcut keys
1, Ctrl + K/ctrl + Shift + K
Quickly find the selection in the current document backwards/forwards, although Ctrl + F is also available, but this is more convenient.

2, ALT + LEFT ARROW/ALT + RIGHT ARROW
Back/forward to the last code location, this group is usually when you look at the code, a continuous jump to several classes or methods, you want to go back to see, it is very convenient.

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

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

Less frequently used skill shortcut keys
1. Alt + Shift + S: Open the refactoring right-click menu to generate the Getter/setter method, construction method, ToString () method
2, Alt + Shift + Z: Put the selected code in the while, for, try...catch and other structures
3, Ctrl + F6/ctrl + Shift + F6/ctrl + e switch to previous/next editor or List Editor display card
4, F3 fast positioning the cursor position of the class, method, property
5. F4 displays the inheritance relationship of the current class and opens the Class inheritance view (or a similar CTRL + T to quickly display the inheritance of the current class)
6. Ctrl + Q to position the last edit

Eclipse shortcut Key Usage Summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.