Let's use eclipse more quickly

Source: Internet
Author: User

Shortcut Keys should be a time-saving element. Therefore, I found the following shortcut keys on the Internet to allow more programmers to use eclipse more quickly.

CTRL + M switch window size

CTRL + q jump to the last Edit

CTRL +/in the code window //~ Annotations. Once again, the comment is canceled.
CTRL + Shift +/This is the case in the code window /*~ */Comment, which is in the JSP file window <! --~ -->.

Alt + Shift + O (or click the toggle mark occurrences button in the toolbar) When you click a tag, the yellow color of this tag is highlighted elsewhere on the page, and the right border of the window will show a white square, click this square will jump to this mark.

CTRL + I format the activated element format active elements.
CTRL + Shift + F format the file format document.
CTRL + S Save the current file.
CTRL + Shift + S save all unsaved files.

CTRL + Shift + F4 close all open editer. CTRL + W (CTRL + F4) disable the current editer

CTRL + Shift + M (place the cursor on the class name of the package to be imported first) to add the Import Statement.
CTRL + Shift + O is used to add missing import statements and delete unnecessary import statements.
CTRL + D Delete the current row.

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

CTRL + z undo the current change

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)
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 + T quickly display the inheritance structure of the current class
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)

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)

CTRL + F is used to find the variable you want to search for in your editer, And you can modify the name.

Source: http://www.javaeye.com/topic/185254

Ranking of the most common shortcut keys in eclipse

1. Alt +/Automatic completion

2. CTRL + O quick outline: function list. You can customize this window.

3. CTRL + K (plus shift is up) Search down the selected string

4. press Ctrl + J (add shift to the top) to enter the downward search status. Click the string you want to search. eclipse will directly locate the consecutive characters you entered with your buttons. after finding the character, press the character marker to find the next or previous character. press the left and right arrow keys or ESC to display the quick search status.

5. CTRL + 1 fast speed correction function. when the variable is incorrect, the system prompts you how to correct the error after pressing the button ., it also provides several solutions for you to choose, such as creating error variables and creating classes. and so on

6. CTRL + Shift + always move up and down to find a function and variable

7. F2 can view complete function help information and copy and paste text

8. Find the variable definition in F3

9. F4 find the specific implementation class of the Interface Method

10. Press Ctrl + Q to locate the Last edited page, no matter which page you are currently opening. Locate the Last edited page and

Common eclipse shortcut keys

1. CTRL + Shift + R: Open the resource

This may be the most time-efficient combination of all shortcut keys. This set of shortcuts allows you to open any file in your workspace, and you only need to press the file name or the first few letters in the mask name, such as applic *. xml. The disadvantage is that this set of shortcut keys are not available in all views.

2. CTRL + O: Quick outline

If you want to view the method of the current class or a specific method, but do not want to pull the code down or use the search function, press Ctrl + O. It lists all methods and attributes of the current class. You only need to enter the name of the method you want to query and click Enter to directly jump to the desired location.

3. CTRL + E: Quick conversion Editor

This set of shortcut keys will help you browse between open editors. You can use Ctrl + Page down or Ctrl + page up to browse the front and back tabs. However, CTRL + E is more efficient when many files are opened.

4. Alt + Shift + R: Rename

Renaming properties and methods was a hassle a few years ago and requires a lot of search and replacement, so that the Code became scattered. Today's Java ide provides the source code processing function, as is eclipse. Now, renaming variables and methods is very simple, and you will get used to renaming every time a better alternative name appears. To use this function, move the mouse over the attribute or method name, press Alt + Shift + R, enter a new name, and press Enter. This is done. If you Rename an attribute in the class, you can click Alt + Shift + R twice. This will call the source code processing dialog box and automatically rename the get and set methods.

5. Shift + enter and CTRL + Shift + enter

Shift + enter creates a blank row under the current row, regardless of whether the cursor is at the end of the row. CTRL + Shift + enter insert a blank row before the current row.

6. Alt + direction keys

This is also a magic weapon to save time. This combination moves the content of the current row up or down. In the try/catch section, this shortcut is particularly useful.

7. CTRL + m

Large display screens can improve work efficiency. CTRL + m is the shortcut key for maximizing the size of the editor window.

8. CTRL +. And Ctrl + 1: Next error and quick Modification

CTRL +. move the cursor to the next error or warning area in the current file. I usually use this set of shortcut keys together with Ctrl + 1, that is, modify the recommended shortcut keys. The modification suggestions for the new version of eclipse are very good and can help you solve many problems, such as missing parameters in methods, throw/catch exception, and unexecuted methods.

9. Tab key

Move the combination to the right

10. Shift + Tab

Move the combination to the left

11. Alt +/Key

Show matching tags

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/xxt06097/archive/2009/08/14/4445791.aspx

This article introduces several important shortcuts commonly used by eclipse:

Edit related shortcuts
1. [Alt + /〕
Provide content assistance to users.
2. [Ctrl + O 〕
Display the outline of Chinese methods and attributes for quick positioning.
3. [Ctrl + /〕
Quickly add or uncomment a comment for the row where the cursor is located or for the selected row.
4. [Ctrl + M 〕
Window maximization and restoration.
5. [Ctrl + 1 〕
Quick correction.
View and locate shortcuts
1. [Ctrl + k] and [Ctrl + Shift + k 〕
Search down and up quickly.
2. [Ctrl + Shift + T 〕
Find the class that can be found in the build path.
3. [Ctrl + Shift + R 〕
Search for all files in the build path.
4. [Ctrl + Shift + G 〕
Search for reference of classes, methods, and properties.
5. [Ctrl + Shift + O 〕
Quickly generate import.
6. [Ctrl + Shift + F 〕
Format the code.
7. [Alt + Shift + W 〕
Find the path in the project where the current file is located.
8. [Ctrl + L 〕
Locate a row in the current editor.
9. [Alt + <-] and [Alt +-> 〕
Backward history and forward history.
10. [F3 〕
Quickly locates a class, method, and attribute at the cursor position.
11. [F4 〕
Displays the inheritance relationship of a class.
Debugging shortcuts
1. [Ctrl + Shift + B] set or cancel a breakpoint on the current line.
2. [F8] continue to run until the next breakpoint or program ends.
3. [F11] Debug the last executed program.
4. [Ctrl + F11] run the last executed program.
Others
1. [Ctrl + F6] and [Ctrl + Shift + F6]: switch to the next editor or the previous editor.
2. [Ctrl + F7] and [Ctrl + Shift + F7]: switch to the next view or the previous view.
3. [Ctrl + F8] and [Ctrl + Shift + F8]: switch to the next or previous perspective.

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.