Common Eclipse shortcuts and eclipse shortcuts

Source: Internet
Author: User

Common Eclipse shortcuts and eclipse shortcuts

Frequently used:

Edit related shortcuts

View and locate shortcuts

Refactoring shortcuts

Above from http://www.cnblogs.com/TankXiao/p/4018219.html

Prompt key Configuration

By default, the code prompt function of Eclipse and MyEclipse is much worse than that of Microsoft Visual Studio, mainly Eclipse. MyEclipse has many options which are disabled by default, you need to manually configure the configuration by the developer. If you are not clear about Eclipse, the code prompt function of MyEclipse is as powerful as that of Microsoft Visual Studio.

First, let's give a simple example to illustrate the problem. For example, in Eclipse and MyEclipse code, you cannot get code prompts by playing foreach or switch ), let alone others, and get very friendly code prompts in Microsoft Visual Studio. In fact, in Eclipse, the code prompt function in the MyEclipse code is usually clicked "." by default, and the code prompt is usually clicked.

Principle: The "Auto Activation triggers for java" option refers to the option that triggers the code prompt. "to". abcdefghijklmnopqrstuvwxyz (, "refers to 26 letters and ., (These symbols trigger the code prompt function. Enhance the code prompt function of Eclipse and MyEclipse. How can I configure it?

Code prompt setting steps

Conclusion: The "Auto Activation triggers for java" option refers to the option that triggers the code prompt. "to". abcdefghijklmnopqrstuvwxyz (, "refers to 26 letters and. these symbols trigger the code prompt function.

Finally, we recommend that you change the pop-up time to less than 100 milliseconds. Otherwise, the pop-up time will only pop up when you are finished.

In Eclipse, how can I press System. out. println () with the shortcut key ():

If you do not prompt the command name sysout when printing Sy characters, you can customize the string and command name to be printed. Similar to the key-value option, you can choose Windows> Preferences> Java> Editor> Templates> new to customize the key-value option.

Prompt shortcut key settings:

Open Window-> Preference-> Generate-> Keys, and a large dialog box is displayed. The command name "Alt +/" corresponds to "Content Assist". Find this command, click to select it. At this time, the Binding and When in the window will automatically display the Command Information, delete the information in the Binding, and then press the keyboard Alt + /, at this time, the Binding will automatically display the Alt +/shortcut key, then select Editing Java Source in the when window, and click OK.

Background:

Window -- preference -- java -- editor-completion proposals Background color 205

This background color is the legendary eye protection background color!

Keyword to configure different colors

Modify the class name and interface name highlighted in different colors.

Of course there are other related color configurations. In fact, there are many items that can be configured in the "Preferences", so that Eclipse is optimized. Specifically, You need to configure them according to your personal Preferences.

Adjust the display size of codes in Myeclipse

Window-> preferences-> general-> apperance-> colors and fonts-> basic-> text-> fonts
Click change!

Set the background color of the MyEclipse editing window

Right-click the edit window and choose --> Preferences --> General plus sign --> Editors plus sign --> Text Editors. In the lower-right window, select Backgroud color, and click System Default on the right, click the Color box on the Right of Color and select the Color OK.

Common shortcut keys

Eclipse has powerful editing functions, master the Eclipse shortcut key function, and greatly improve development efficiency.

Shortcut Keys related to editing. View and locate shortcuts

In the program, it is not easy to quickly locate the location of the code and quickly locate the Bug. Eclipse provides powerful search functions, you can use the following shortcut keys to search for and locate data.

Debugging shortcuts

Eclipse has the following shortcut keys related to running debugging.

Common editor shortcuts

Generally, the text editor provides editing-related shortcut keys, which can be used in Eclipse to edit text.

Other shortcuts

There are still many shortcut keys in Eclipse that cannot be listed one by one. You can find their usage methods through the help documentation. There are also several common shortcut keys as follows.

There are many shortcut keys in Eclipse. You can find all the shortcut keys in the help document, but it is impossible to master the use of all the shortcut keys, and it is not necessary, if you take some time to get familiar with the shortcut keys listed in this section, you will get twice the result with half the effort.

Shortcut Keys
    • Alt +/code assistant inserts some code (but it is usually in conflict with the input method, you can modify the Input key, or temporarily use
      Alt +/to replace)
    • Ctrl + 1: move the cursor over a variable and press Ctrl + 1 to provide a quick refactoring solution. Select several rows and press Ctrl + 1
      Put the code in the for, while, if, do, or try code blocks.
    • Double-click the left brackets (parentheses, braces, and braces) to select all the content in the brackets.
    • Alt + Enter display the properties of the currently selected resource (project, or file)

      Ctrl Series
    • Ctrl + K: move the cursor over the variable. Press Ctrl + K to find the next variable.
    • Ctrl + Shift + K: the opposite direction of Ctrl + K search
    • 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 + Shift + E display the managers that manage all Opened Views (you can choose to close or activate them)
    • 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 + T quickly display the inheritance structure of the current class
    • Ctrl + Shift-T: Open type ). If you do not intend to sharpen the work, or forget to use the source
      Tree.
    • Ctrl + O: open a small window similar to the Outline View in the code
    • Ctrl + mouse stop: displays the source code of the class and Method
    • Ctrl + H: Open the search window
    • Ctrl +/(keypad) collapse all code in the current class
    • Ctrl + × (keypad) show all the code in the current class

      Ctrl + Shift Series
    • Ctrl + Shift + F format the current Code
    • Ctrl + Shift + X change all selected text to lowercase
    • Ctrl + Shift + Y change all selected text to lowercase
    • Ctrl + Shift + O: Fast import
    • Ctrl + Shift + R: open Resource
    • Ctrl + Shift +/Add segment comments /**/
    • Ctrl + Shift + \ cancel segment comments /**/
    • Shift + Alt + Jt write document comments for methods

      F shortcut key Series
    • F3: open the file that declares the reference.
    • F4: Open the type hierarchy
    • F5: One-Step Jump
    • F6: Skip in one step
    • F7: One-Step Jump out
    • F8: continue. If there is no breakpoint at the end, the program will be running

      Used for row editing
    • 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)
    • 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)
    • Ctrl + Shift + Enter insert blank lines in the current line (same principle)

      Not commonly used
    • Alt + ↓ previous edited page
    • Alt + → next edited page (of course for the above)
    • Ctrl + Shift + S: Save all
    • Ctrl + W disable the current Editer
    • Ctrl + Shift + F4 close all open Editer
    • Ctrl + Shift + G: Search for references in workspace
    • 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)

      Shortcuts that are hard to understand
    • Ctrl + J forward incremental search (after pressing Ctrl + J, each letter editor you enter provides a quick match to locate a word, such
      If no, it is not found in stutes line. It is particularly useful when querying a word. This feature 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)

      • Author: samuel. wang [The Horizon Blog]
        Source: http://www.cnblogs.com/samuelwnb/
        Copyright: The copyright of this article is shared by the author and the blog
        Reprinted: you are welcome to reprinted. To save the author's Creative Enthusiasm, please follow the instructions [reprinted]

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.