Eclipse practical shortcut keys-javaee open source Daquan and personal favorites

Source: Internet
Author: User
Eclipse shortcut keys

As the saying goes, to do a good job, you must first sharpen the tool. If you have a fever for the development program, you will know how much the shortcut key has played a role in programming (of course, except for the DOS program developed with natepad ), I am such a enthusiast and I am very interested in the shortcut functions in various ides, especially the shortcut keys. in addition, eclipse is my favorite, so the shortcut keys in eclipse are my focus. Of course, the shortcut keys in eclipse are not the strongest at the moment, I have seen the IDE with the best shortcut keys belong to idea, and the shortcut keys in it are all-encompassing for programmers, almost as long as you don't think of it, you can't afford it (Hey, it seems to have advertised it ). but to be honest, a lot of functions come from eclipse. but so far, I have found that eclipse is inferior to other smart development aspects in terms of shortcuts (this is only from the Java ide perspective). If you don't talk about it, you just need to get started.

The shortcut keys I wrote today are summed up in my practical use. I feel very practical and arrange them based on my preferences, if eclipse does not have any special instructions, eclipse3.0.x or above is used. If some eclipse does not meet the requirements, it may be a version issue or conflict with other system-level shortcut keys, for example, if the input method conflicts, You need to modify the input method. the following shortcut keys are unique to eclipse, especially for Java editer, but some of them are also useful for text in eclipse. The following are the shortcut keys: these shortcut keys will be gradually improved with the continuous development of their own learning and the continuous improvement of the eclipse version, some of which are too common to be listed, such as Ctrl + ):

CTRL + 1 quick fix (the most classic shortcut, you don't need to talk about it)

CTRL + D: Delete the current row

CTRL + ALT + ↓ copy the current row to the next row (copy added)

CTRL + ALT + ↓ copy the current row to the previous row (copy added)

Alt + ↓ interaction position between the current row and the following row (especially practical, you can save cutting and pasting)

Alt + ↑ interaction between the current row and the previous row (same as above)

Alt + ↓ previous edited page

Alt + → next edited page (of course for the above)

Alt + enter display the properties of the currently selected resource (project, or file)

Shift + enter insert empty rows in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row)

Shift + Ctrl + enter insert blank lines in the current line (same principle)

CTRL + q locate the Last edited location

CTRL + l locate in a line (for those with more than 100 programs, there will be good news)

CTRL + M maximize the current edit or view (then press it, and vice versa)

CTRL +/comment out the current row, and then press it to cancel the comment

CTRL + O quick outline display

CTRL + T quickly display the inheritance structure of the current class

CTRL + W disable the current editer

CTRL + k quickly locate to the next one by referencing the selected word

CTRL + E: Click it to quickly display the drop-down list of the current editer (if the current page is not displayed, it is displayed in bold)

CTRL +/(keypad) collapse all code in the current class

CTRL + × (keypad) show all the code in the current class

CTRL + Space Code assistant inserts some code (but it is usually in conflict with the input method. You can modify the key of the input method or replace it with ALT +/for the moment)

CTRL + Shift + e display the managers that manage all Opened Views (you can choose to close or activate them)

CTRL + J forward incremental search (after pressing CTRL + J, each letter editor you enter provides a quick match to locate a word. If not, it is not found in stutes line. It is particularly useful when querying a word. This function was available two years ago)

CTRL + Shift + J reverse incremental search (the same as the previous one, but only from the back to the front)

CTRL + Shift + F4 close all open editer

CTRL + Shift + x change all selected text to lowercase

CTRL + Shift + y change all selected text to lowercase

CTRL + Shift + F format the current Code

CTRL + Shift + P locate the matched character (for example, {}) (when positioning from the front, the cursor must be inside the matched character, followed by the front, and vice versa)

 

Alt + Shift + J add Doc comments to the Function

The following shortcut keys are commonly used in refactoring. I like them and want to sort them out frequently (note: the keys for refactoring generally start with ALT + shift)

Alt + Shift + R Rename (one of my favorite ones, especially the rename of variables and classes, which saves a lot of labor compared with manual methods)

Alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially useful for a lot of mud code)

Alt + Shift + C modify the function structure (more practical. N functions call this method and modify it once)

Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, especially when multiple calls are performed)

Alt + Shift + F convert the local variable in the class to the field variable (more practical)

Alt + Shift + I merge variables (this may be a bit inappropriate inline)

Alt + Shift + V moving functions and variables (not commonly used)

Alt + Shift + z restructured regret medicine (UNDO)

 

Add myself:

F2 modifies the file name, which is sometimes useful for copying the name.

CTRL + Shift + O: the most efficient shortcut key. Import unimported packages and delete unnecessary packages.

CTRL + Shift +/comment on the code block. Java and JSP files are different.

CTRL + Shift + W close all open files.

CTRL + Shift + l pop up all shortcuts

Alt + Shift + x pops up and runs shortcuts such as ant, java files, and JUnit, which are very practical.

Template: Alt +/
Modify: WINDOW> Settings> workbench> buttons> Edit> content assist.
My habits: Shift + space (blank ). Simple Description: When editing the program code, press sysout + template to activate the key.
System. Out. println (); is automatically displayed ();.

Press the button on the left of CTRL in the lower right corner to bring up the menu at the location, saving the right-click.

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.