Common:
Edit related shortcut keys
- Note Ctrl +/
- Quick fix Ctrl + 1
- Delete Current line Ctrl + D
- Formatting a document Ctrl + Shift + F
- Insert blank line Shift + Enter
- Edit window Maximize Ctrl + M
- Show outline Ctrl + O
View, locate shortcut keys
- Find Java class file Ctrl + Shift + T
- Find References Ctrl+shift+g
- Fallback history alt+←, alt+→
- Quickly find the selected content Ctrl+k
Refactoring shortcut keys
- Renaming Alt+shift+r
The above originates from http://www.cnblogs.com/TankXiao/p/4018219.html
Prompt key Configuration
By default, Eclipse, MyEclipse's Code hints feature is much worse than Microsoft Visual Studio, primarily Eclipse, myeclipse itself has many options that are turned off by default, to be manually configured by the developer himself. If the developer is not sure, Eclipse is not known, and the MyEclipse Code hints feature is as powerful as the code hinting features of Microsoft Visual Studio.
Let's start with a simple example of the problem, such as in Eclipse, MyEclipse code, playing a foreach,switch and so on, is not able to get the code hint (do not trust themselves to try), the others, not to mention, but in the Microsoft Visual Inside the Studio is a very friendly code hint. In fact, Eclipse, the code hint function in the MyEclipse code is usually the point ".", which is usually a point "." Before a code hint is available.
Principle: "Auto Activation triggers for Java" This option refers to the option to trigger the code hint, change "." To ". ABCDEFGHIJKLMNOPQRSTUVWXYZ (,", It means encountering 26 letters and. (These symbols trigger the code hinting function.) Enhanced eclipse, MyEclipse code hints function, specifically how to configure?
Code hints Setup Steps
- opens myeclipse, then window → Preferences
- Select Java, expand, Editor, and select Content Assist.
- Select "Content Assist" and see the "Auto
Activation triggers for Java" option under "Auto-activation" on the right, to the right. Actually, it means "." is the trigger code hint. This symbol.
- "Auto Activation triggers for Java" option, in the "." After the addition of ABC letters, convenient to find the following changes. Then "Apply" and click "OK".
- Then, select any item "File" → "Export", select "Perferences" in the pop-up window and click "Next".
- Select the export file path, I export to the desktop, enter "test" as the file name, click "Save".
- on the desktop, locate the file you just saved "TEST.EPF", and right-select "Open with Notepad."
- can see many configuration myeclipse information
- Press "CTRL + F" shortcut key, enter ". ABC" and click "Find Next".
- to find the configuration information for ". ABC".
- change ". abc" to ". ABCDEFGHIJKLMNOPQRSTUVWXYZ (,", Save, Close "TEST.EPF").
- back to the MyEclipse interface, "file" → "Import", in the pop-up window select "Perferences", click
Click "Next", select just in the modified "TEST.EPF" file, click "Open", click " Finish ". This step
is similar to the export step above. The
- was, of course, a code test. Just create a new project and create a new class. Test in code input Switch,foreach, etc.
. You will immediately find that the hint, and no matter which letter will have a lot of relevant hints, very flow
smooth, very convenient.
Summary: The "Auto Activation triggers for Java" option refers to the option to trigger the code hint and "." Change to ". ABCDEFGHIJKLMNOPQRSTUVWXYZ (," means to encounter 26 letters and.) These symbols trigger the code hinting function.
Finally: The automatic prompt pop-up time is best to change to 100 milliseconds or less, otherwise you are finished, automatic prompt to bounce out.
How to use shortcut keys in Eclipse to System.out.println ():
If you do not have a command name named Sysout when you print the SY character, you can customize the string and command name you want to print. Similar (can Key-value) can be customized here windows->preferences->java->editor->templates->new.
prompt shortcut key setting:
Open Window->preference->generate->keys, a large dialog box appears, "alt+/" corresponding to the command name is: "Content Assist", locate the command, click to select it. At this time in the window of the binding and when will appear automatically display the command information, delete the information in the binding, and then press the keyboard alt+/, the binding will automatically display the alt+/shortcut keys, and then when the window select editing Java Source, and finally click OK.
Hint background:
Window--preference--java--editor-completion proposals Background Color recommended 85,90,205
This background color is the legendary protection of the eye background color!
Keyword to configure different colors
Modify the name of the class, interface name, etc., highlighted in different colors
- Open myeclipse, then "window" → "Preferences".
- This can be configured in "Java" → "Enditor" → "Syntax coloring".
- On the right, expand "java" → "classes", tick "Enable" this option, choose your favorite color.
There are, of course, other related color configurations. In fact, in the "Preferences" this thing, there are many things that can be configured, so that Eclipse optimization, specific to each person according to their own preferences to configure.
Adjust the display size of code in MyEclipse
Window->preferences->general->apperance->colors and Fonts->basic->text->fonts
Then you can change it by clicking on it!
Set myeclipse edit window background color
Edit Window Right-click--"preferences--" General plus--"editors plus--" dot text editors--"click on the lower right window select Backgroud color, the right point off the system default button, Color box to the right of dot color, select color OK
Common shortcut keys
Eclipse's editing capabilities are powerful, and mastering the Eclipse shortcut key capabilities can greatly improve development efficiency.
Some shortcut keys related to editing.
- "alt+/"
This shortcut is a good helper for users to edit, can provide users with content assistance, do not worry about the method and the name of the property,
When remembering the names of classes, methods, and properties, experience the benefits of "alt+/" shortcut keys.
- "Ctrl+o"
shows an outline of the methods and properties in a class that quickly locates the methods and properties of a class and is useful for finding bugs.
- "ctrl+/"
Quickly add comments that can quickly annotate or uncomment the line or selected line of the cursor, and may always be required when debugging
To annotate something or uncomment it, it's OK now, and you don't need to repeat the comments on each line.
- "Ctrl+d"
Delete the current line, which is also the author's favorite one, do not have to delete a row and press so many times the delete key.
- "Ctrl+m"
Window maximization and restore, when the user in the window operation, always feel that the current window is small (especially when writing code), is now
In the good, try "ctrl+m" shortcut keys.
Viewing and locating shortcut keys
In the program, quickly locate the location of the code, quickly find the place where the bug is very difficult, Eclipse provides a powerful search function, you can use the following shortcut keys to help complete the job of locating.
- "Ctrl+k", "Ctrl++shift+k"
Find the selection quickly down and up, and you no longer need to click the Find dialog box with your mouse.
- "Ctrl+shift+t"
Find a Java class file in the search workspace (Workspace) build path, do not suffer from the discovery of classes, and you can
Use "*", "? "And so on wildcard characters.
- "Ctrl+shift+r"
and "Ctrl+shift+t", Find all the files (including Java files) in the workspace (Workspace), or you can
Use a wildcard character.
- "Ctrl+shift+g"
Find references to classes, methods, and properties. This is a very useful shortcut key, for example, to modify the code that references a method, you can
To quickly position all references to this method by using the "ctrl+shift+g" shortcut key.
- "Ctrl+shift+o"
Quickly generate 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."
- "Ctrl+shift+f"
Formatting code, writing the code of the format specification is a required lesson for every programmer, and when you see a piece of code that is very uncomfortable, select
You can format this code by pressing the "ctrl+shift+f" shortcut, and if you do not select the code, the current file is formatted by default (Java
files).
- "Alt+shift+w"
Find the path in the project where the current file is located, and you can quickly locate the location of the browser view, if you want to find a file that contains the
Package, this shortcut is useful (especially in larger projects).
- "Ctrl+l"
Navigates to a row in the current editor and is also valid for non-Java files.
- "alt+←", "alt+→"
Backward history and forward history are useful in tracking code, and users may find several related places, but
It may not be clear that you can locate the order of lookups by using these two shortcut keys.
- "F3"
A class, method, and property that quickly locates the cursor position.
- "F4"
Displays the inheritance relationship for the class and opens the Class inheritance view.
debugging shortcut keys
There are several shortcut keys in eclipse that are related to running debugging.
- "Ctrl+shift+b": Sets a breakpoint on the current line or cancels the setting.
- "F11": debugs the last executed program.
- "Ctrl+f11": Runs the program that was last executed.
- "F5": In the trace to method, when the program executes to a method, you can press "F5" key to trace to the method.
- "F6": Stepping through the program.
- "F7": Executes the method, returning to the next statement that called this method.
- "F8": Continue execution to the next breakpoint or end of the program.
Common editor shortcut keys
Usually the text editor provides some shortcut keys related to editing, which you can also use to edit text in eclipse.
- "Ctrl + C": Copy.
- "Ctrl+x": Cut.
- "Ctrl + V": Paste.
- "Ctrl+s": Save the file.
- "Ctrl + Z": Undo.
- "Ctrl+y": Repeat.
- "Ctrl+f": Find.
Other shortcut keys
There are many shortcuts in eclipse that cannot be enumerated, and users can find out how to use them through the Help document, as well as several common shortcut keys.
- "CTRL+F6": Switch to the next editor.
- "CTRL+SHIFT+F6": Switches to the previous editor.
- "CTRL+F7": Switches to the next view.
- "CTRL+SHIFT+F7": Switches to the previous view.
- "Ctrl+f8": Switches to the next perspective.
- "Ctrl+shift+f8": Switches to the previous perspective.
There are many shortcuts in eclipse, which can be used to find all the shortcuts through the Help document, but it is not possible to master all the shortcuts, and it is not necessary to take the time to familiarize yourself with the shortcut keys listed in this section.
- Edit->content Assist-> Add alt+/Code Association
- window, Next Editor, add ctrl+tab switch windows
- Run/debug Toggle Line breakpoint, add Ctrl + ' delete breakpoints when debugging
- Source-> Surround with Try/catch Block--ctrl+shift+v add try Catch box
- Source-Generate Getters and Setters-ctrl+shift+. Add a Get Set method
shortcut keys to organize useful shortcuts
- alt+/Code Helper to complete some code insertion (but general and input method conflict, you can modify the input method hotkey, you can also take up
alt+/to replace)
- CTRL+1: The cursor stops at a variable, and pressing the CTRL+1 key can provide a quick refactoring scheme. Select several rows and press Ctrl+1 to set the
The segment code is placed in a code block such as for, while, if, do, or try.
- Double-click the opening parenthesis (parentheses, brackets, curly braces) to select everything in parentheses.
Alt+enter displays the properties of the currently selected resource (project, or file or file)
Ctrl Series
- Ctrl+k: Hover the cursor over the variable and press Ctrl+k to find the next same variable
- Ctrl+shift+k: Opposite to Ctrl+k Lookup
- Ctrl+e quick display of the current Editer drop-down list (in bold if the current page does not appear)
- Ctrl+shift+e Display manager that manages all of the currently open view (you can choose to close, activate, and so on)
- Ctrl+q positioning to the last edited place
- Ctrl+l positioning in a row (for people with programs over 100 have the gospel)
- Ctrl+m maximize the current edit or view (and vice versa)
- ctrl+/comment on the current line, and then uncomment it
- Ctrl+t quickly displays the inheritance structure of the current class
- CTRL+SHIFT-T: Opens type (open type). If you are not intentionally skiving, or forget to pass the source tree (source
Tree) Open the way it is.
- Ctrl+o: Open a small window like outline view in your code
- CTRL + Mouse hover: can display the source code of classes and methods
- Ctrl+h: Open the Search window
- ctrl+/(numpad) collapses all code in the current class
Ctrl+x (keypad) expands all code in the current class
Ctrl+shift Series
- Ctrl+shift+f formatting of the current code
- Ctrl+shift+x the text that is currently selected is all stale lowercase
- Ctrl+shift+y turns the currently selected text to lowercase
- Ctrl+shift+o: Importing import quickly
- Ctrl+shift+r: Opening resource Open Resource
- ctrl+shift+/Plus paragraph annotation/**/
- Ctrl+shift+\ Canceling segment Comments/**/
SHIFT+ALT+JT writing a document annotation to a method
F Shortcut Key series
- F3: Open the file that declares the reference
- F4: Open type hierarchy
- F5: Single-step jumping in
- F6: one-step skip
- F7: Step Outside
F8: Continue, if there are no breakpoints behind, the program will run out
For line editing
- Ctrl+d: Delete When moving forward
- Ctrl+alt+↓ Copy the current row to the next row (replication incremented)
- Ctrl+alt+↑ Copy the current line to the previous row (replication incremented)
- Alt+↓ the current line and the next line of interaction (especially useful, can be omitted first cut, then pasted)
- Alt+↑ the current line and the upper row interaction position (IBID.)
- Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)
Ctrl+shift+enter Insert blank line in current line (principle above)
Not used.
- alt+← the previous edited page
- alt+→ next Edit page (of course, for the above article)
- Ctrl+shift+s: Save All
- Ctrl+w Closing the current editer
- Ctrl+shift+f4 Close all open editer
- CTRL+SHIFT+G: Searching for references in workspace
Ctrl+shift+p position to the match (for example {}) (after locating from the front, the cursor is in the match, back to front, or vice versa)
Hard to understand shortcut keys
- Ctrl+j forward Incremental Lookup (after you press ctrl+j, each letter editor you enter provides a quick match to navigate to a word, such as
If not, then the Stutes line shows no found, check a word, especially practical, this function idea two years ago.
CTRL+SHIFT+J Reverse incremental lookup (same as above, except forward)
- Samuel.wang "The Horizon Blog"
Source: http://www.cnblogs.com/samuelwnb/
Copyright: This article is owned by the author and the blog Park
Reprint: Welcome reprint, in order to preserve the author's passion for Creation, please "reprint" according to the requirements
Eclipse Common shortcut keys