Eclipse Common shortcut keys

Source: Internet
Author: User
Tags php class

Eclipse is one of the most mainstream Java project development Ides. Not only java,c/c++, PHP, Scala, Android, JavaScript, HTML5 and other languages can be developed using Eclipse or eclipse-based development tools such as Eclipse CPP, Zend Studio. By using Eclipse's shortcut keys, you can significantly improve our development productivity.

Below, let's introduce some common and useful Eclipse shortcut keys. The common shortcut keys described in this article are the default settings for Eclipse's official shortcuts, but you can also change the shortcut settings yourself, depending on your individual needs.

Run & Debug Run: Ctrl + F11

Use the shortcut key CTRL + F11 to quickly run the currently selected resource file.

Commissioning: F11

Use the shortcut key F11 to quickly debug the currently selected resource file.

Breakpoint Debugging Operations: F5, F6, F7, F8

When debugging a breakpoint, the shortcut key F6 is the next step (stepping over), F5 is the next step (stepping in) that executes the internal detail step of the current call, F7 is skipping the steps inside the method, returning directly to the next step outside the method (stepping back); F8 is stepping out of the breakpoint (skipping debugging, continuing to execute the code, Pause debugging at the next breakpoint at the breakpoint again).

Edit & Process Content Assist: Alt +/

Use the shortcut key ALT +/to let Eclipse smart list the variables or method names that may need to be filled out to perform the auto-complete function. For example: You have defined the Softown and site_name two variables, you enter an "s", and then press the shortcut key ALT +/, you can list Softown and site_name and so on all the variables or method names starting with S (if applicable to the current context), So that you can choose to complete the input quickly and accurately.

Case conversion: Ctrl + Shift + x/y

By first selecting the specified text and pressing CTRL + SHIFT + X, you can convert all the corresponding text to uppercase, and press the CTRL + SHIFT + Y key to convert all to lowercase.

Delete selected line: Ctrl + D

If the mouse does not have any text selected, CTRL + D deletes the entire line of text in the row where the cursor is located, and if the mouse has selected the selected line, all rows that are checked are deleted (even if only a portion of the line is selected).

Move Up/Down selected line: Alt +↑/↓

Use Alt +↑ to quickly swap the selected row with the upper row adjacent to the position. Use Alt +↓ to quickly swap positions with adjacent lines below. (The row that contains the mouse cursor is the selected row if no row is selected)

Copy up/down selected line: Ctrl + Alt +↑/↓

Use CTRL + Alt +↑ to quickly copy all the contents of the currently selected row to the top of the adjacent position, and use CTRL + Alt +↓ to quickly copy to the adjacent lower position. (The row that contains the mouse cursor is the selected row if no row is selected)

Rename: Ctrl + Shift + R

Place the mouse cursor at the specified variable or method name location, use the shortcut key CTRL + Shift + R to quickly rename the variable or method, and all references that can be detected elsewhere will be changed synchronously.

Organization import: Ctrl + Shift + O

In the specified file, use the shortcut key CTRL + Shift + O to intelligently organize the file import package name or namespace. In short, with this shortcut, Eclipse will automatically import the package name that you need to import in the file, clearing out the cumbersome package names that you don't need to import.

Format code: Ctrl + Shift + F

Use the shortcut key CTRL + Shift + F to format the selected code block (if no code block is selected, format the entire file), select the package name in the project directory, format all code files under the package, and select the project name to format the code files throughout the project. Formatting lets you write messy code that automatically becomes neat.

Search & Find go To Definition: F3

Place the mouse cursor over the specified method call or variable call, and use the shortcut key F3 to quickly go to the location where the method or variable is defined.

using CTRL + LEFT mouse button can also achieve the same effect as F3.
Search for and open a resource file: Ctrl + Shift + R

Use this shortcut to quickly blur the search to a resource file (any file format) of the specified name in the current workspace. (Fuzzy search based on file name in any format)

Search for and open type files: Ctrl + Shift + T

Use this shortcut to quickly blur the search to a type resource file (Java class, PHP class file, and so on) for the specified name in the current workspace. (Fuzzy search based on class name or interface name)

Search file: Ctrl + H

Using the shortcut key CTRL + H, you can search the current workspace for all files that contain the specified string. (Fuzzy search based on the specified string)

View references: Ctrl + Shift + G

Place the mouse cursor at the specified variable or method name location, and use the shortcut key CTRL + Shift + G to see where the variable or method has occurred (that is, where it has been called).

Back up/Next edit location: Alt +←/→

If you have just edited at line 20 of the file, you are now editing at 100 lines of the file, and you can use Alt +← to quickly go back to the location of the last edit operation (that is, 20 lines). Use Alt +→ to go back to the next edit position (that is, 100 lines). This shortcut key supports spanning different files if you previously edited in a file, now in B file editing, using Alt +← can also go back to the last edit position in a file.

Jump to the specified line: Ctrl + L

Use the shortcut key CTRL + L, and then enter the specified line number to jump to the location of the specified line.

Quick outline: Ctrl + O

Using the shortcut key CTRL + O, you can display the contents of the current file outline, that is, all the variables, methods list, you can enter a string to facilitate fuzzy matching, narrow the scope of the filter. This quickly jumps to the defined position of the specified variable or method.

Toggle Comment Toggle Line Comment: Ctrl +/

Use the shortcut key CTRL +/To quickly add a line comment (that is, "//comment content") to a selected row or rows, or to use the shortcut again to cancel the line comment.

Add or remove block comments: Ctrl + Shift +//\

Use the shortcut key CTRL + SHIFT +/To quickly add a block comment (that is, "/* Comment content */") to the selected row, and use the shortcut key CTRL + SHIFT + \ To cancel the block comment you added earlier. "CTRL + SHIFT +/(slash) = add block comment; Ctrl + SHIFT + \ (backslash) = Suppress block comment"

Reprint Source: http://www.softown.cn/post/224.html

Eclipse Common shortcut keys

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.