Eclipse Development Classic Tutorial: Common shortcut keys

Source: Internet
Author: User
Want to be a programming "Ace"? If there is a shortcut, take a moment to use the Eclipse shortcut key. As a Java development using Eclipse Programming "master", some commonly used shortcut keys must be mastered, it not only can greatly speed up the program to write, debug and locate the bug speed, but also let the leadership feel your "typing speed", why not? Try the magic of full keyboard manipulation.     This section will be from the author's personal experience to sum up some shortcuts, and the shortcut keys to classify, and according to the author's preference, and add relevant explanations, I hope readers can attentively to experience.     Edit-related shortcuts    eclipse's editing function is very powerful, mastering the Eclipse shortcut key function, can greatly improve the development efficiency. The following are some of the key shortcuts in eclipse that are related to editing.    1. "alt+/"     This shortcut for the user to edit a good helper, can provide users with the content of the auxiliary, do not remember the whole method and attribute name, when the name of the class, method and attributes, more experience the "alt+/" shortcut keys bring benefits.    2. The Ctrl+o     outlines the methods and properties in a class to quickly locate the methods and properties of a class and is useful when looking for bugs.    3. "ctrl+/"     quickly add comments to quickly annotate or uncomment the row or selected line of the cursor, and you may need to annotate something or uncomment it when you debug, and now you don't need a duplicate comment for each line.    4. "Ctrl+d"     Delete the current line, this is also one of the author's favorite, do not have to delete a row and press the deletion key so many times.    5. "Ctrl+m"     window maximization and restore, when the user in the window to operate, always feel that the current window small (especially when writing code), now good, try "ctrl+m" shortcut keys.     View and position shortcuts     in the program, quickly locate the location of the code, quickly find where the bug is, is very difficult, Eclipse provides a powerful lookup function, you can use the following shortcut keys to help complete the search positioning work.    1. "Ctrl+k", "ctrl++shift+k"     quickly look down and up to the selected content, no longer need to use the mouseMark click the Find dialog box.    2. Find Java class files in the ctrl+shift+t     Find workspace (Workspace) build path, and do not suffer for a class that cannot be found, and you can use "*". "The wildcard character.    3. "Ctrl+shift+r"     and "ctrl+shift+t" correspond to find all the files (including Java files) in the workspace (Workspace), or you can use wildcard characters.    4. "Ctrl+shift+g"     find references to classes, methods, and properties. This is a very useful shortcut, such as modifying the code that references a method, and you can quickly locate all references to this method by using the "ctrl+shift+g" shortcut key.    5. "Ctrl+shift+o" rapid generation of import, when copying a program from the Internet, do not know how to import into the called class, try "ctrl+shift+o" shortcut keys, there will be surprises.    6. "Ctrl+shift+f"     format code, writing format specification code is a compulsory course for every programmer, when you see a piece of code very uncomfortable, select and press "ctrl+shift+f" shortcut key can format this code, If no code is selected, the current file (the Java file) is formatted by default.    7. Alt+shift+w     Find the path in the project where the current file is located, and you can quickly locate the browser view, which is useful when you want to find the package where a file resides (especially in larger projects).    8. Ctrl+l     Navigates to a row in the current editor and is also valid for non-Java files.    9. The "alt+←", "alt+→"     back history and forward history are very useful for tracking code, and users may have looked up several related places, but may not be able to remember the order in which they are located.    10. "F3" quickly locates a class, method, and property of the cursor position.    11. The F4     shows the inheritance of the class and opens the Class inheritance view.     Debugging shortcut keys  Some of the following shortcut keys are associated with running debugging in  eclipse.    1. "Ctrl+shift+b": a breakpoint that sets a breakpoint or cancels the setting on the current line.    2. "F11": Debug the Last executed program.    3. "Ctrl+f11": Runs the program that was last executed.    4. "F5": Tracked to the method, and when the program executes to a method, it can be tracked to the method by pressing the "F5" key.    5. "F6": Step Into the program.    6. F7: Finishes the method and returns to the last statement that called this method.    7. "F8": Continue execution to the next breakpoint or end of the program.     Common editor Shortcuts     Usually the text editor provides some shortcut keys for editing, and you can also use them for text editing in Eclipse.    1. "Ctrl + C": Copy.    2. "Ctrl+x": Cut.    3. "Ctrl + V": Paste.    4. "Ctrl+s": Save the file.    5. "Ctrl+z": Undo.    6. "Ctrl+y": Repeat.    7. "Ctrl+f": Find.     Other shortcuts    eclipse also has a number of shortcuts, which cannot be enumerated, and users can find out how they are used by help documents, and there are several common shortcut keys below.    1. "CTRL+F6": Switch to the next editor.    2. "CTRL+SHIFT+F6": Switch to the previous editor.    3. "CTRL+F7": Switch to the next view.    4. "CTRL+SHIFT+F7": Switch to the previous view.    5. "Ctrl+f8": Switch to the next perspective.    6. "Ctrl+shift+f8": Switch to previous perspective.    eclipse More shortcuts, you can help the document to find all the use of shortcut keys, but to grasp the use of all shortcut keysis impossible, and there is no need, if you take the time to familiarize yourself with the shortcuts listed in this section, will be twice the effort.
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.