【Java】Eclipse shortcut keys

In the current highly competitive Internet environment, as a technical post such as a programmer, you must continue to learn in order to continuously improve your own strength and exercise your skills. What skills do you need to learn to become a technical talent that companies urgently need?

1. Background and history of IT technology development

Eclipse shortcut key
Ctrl+1 Quick fix (the most classic shortcut key, needless to say)
Ctrl+D: Delete the current line
Alt+↓ The interactive position between the current line and the next line (especially practical, you can save the need to cut first and then paste Alt
+↑ The interactive position between the current line and the above line (same as above)
Alt+← The previous edited page
Alt+→ The next edited page (of course for the above one)
Alt+Enter Display the currently selected resource (project, or Properties of files or files)
Global Find and Replace Ctrl+F
Text Editor Find Previous Ctrl+Shift+K
Text Editor Find Next Ctrl+K
Global Undo Ctrl+Z
Global Copy Ctrl+C
Alt+Shift+R Rename (It is my favorite one, especially the Rename of variables and classes, which can save a lot of labor than manual methods)
Ctrl+Shift+X Change all the currently selected text to uppercase
Ctrl+Shift+Y Change the currently selected text Change all to lowercase
Ctrl+Shift+F Format the current code
Ctrl+L Position it on a certain line (for people with more than 100 programs, there will be good news)
Ctrl+M Maximize the current Edit or View (press again to reverse)
Ctrl+/ Comment the current line, then press to uncomment
Ctrl+O Quickly display OutLine
Ctrl+T Quickly display the inheritance structure of the current class
Ctrl+W Close the current Editor
Ctrl+K Refer to the selected Word to quickly navigate to the next
Ctrl+E Quickly display the drop-down list of the current Editor (if the current page is not displayed, it will be indicated in bold)
The code assistant completes some code insertion (but generally conflicts with the input method, you can Modify the hotkey of the input method, you can also temporarily use Alt+/ instead)
Ctrl+Shift+E Display the manager that manages all currently open Views (you can choose to close, activate, etc.)
Ctrl+J Forward incremental search ( After pressing Ctrl+J, the editor provides quick matching to locate a certain word for each letter you input. If not, it will show that it is not found in the stutes line. It is especially useful when looking up a word. This function Idea It was there two years ago)
Select all globally Ctrl+A
Global cut Ctrl+X
Global paste Ctrl+V
Global redo Ctrl+Y
Global save Ctrl+s
Java editor format Ctrl+Shift+F
Java editor Uncomment Ctrl+/
Java editor comment Ctrl+/
Java editor organization import Ctrl+Shift+O
Java editor uses try/catch block to surround unset, it is too common, so it is listed here, it is recommended to set it yourself.
You can also use Ctrl+1 to automatically correct.
ALT+/ code completion

Shift+Enter Insert a blank line in the next line of the current line (at this time, the mouse can be at any position in the current line, not necessarily the last)
Shift+Ctrl+Enter Insert a blank line in the current line (the principle is the same as above)
Ctrl+Q Positioning Go to the last edited place
Ctrl+/(small keyboard) Collapse all codes in the current class
Ctrl+×(small keyboard) Expand all codes in the current class
Ctrl+Space Ctrl+Shift+J Reverse incremental search (same as above, It’s just checking from the back to the front)
Ctrl+Shift+F4 Close all open Editors
Ctrl+Shift+P Locate the matching character (such as {}) (When locating the back from the front, the cursor must be inside the matching character, and the back To the front, then vice versa)
Ctrl+Alt+↓ Copy the current line to the next line (copy increase)
Ctrl+Alt+↑ Copy the current line to the previous line (copy increase)

The following shortcut keys are commonly used in refactoring. I will sort out the ones I like and often use (Note: Generally, the shortcut keys for refactoring start with Alt+Shift)
Alt+Shift+M extraction method (this is refactoring One of the most commonly used methods in it, especially useful for a lot of mud ball codes)
Alt+Shift+C Modify the function structure (more practical, there are N functions calling this method, modify it once)
Alt+Shift+L Extract local variables (you can directly extract some magic numbers and strings into a variable, especially when calling in multiple places)
Alt+Shift+F Change the local variable in the Class into a field variable (more practical function)
Alt+Shift +I Merge variables (it may be a bit inappropriate to say Inline)
Alt+Shift+V Move functions and variables (not very commonly used)
Alt+Shift+Z Undo for refactoring

Edit
Scope Function Shortcut Key Global Restore Previous Selection Alt+Shift+↓ Global Quick Correction Ctrl1+1
Global Content Assistant Alt+/

Global delete Delete
global context information Alt+?
Alt+Shift+?
Ctrl+Shift+Space
Java editor displays tooltip description F2
Java editor selects package element Alt+Shift+↑
Java editor selects previous element Alt+Shift+←
Java editor selects next element Alt+Shift+→
text Editor incremental search Ctrl+J
text editor incremental reverse search Ctrl+Shift+J

View
Scope function shortcut keys
Global zoom in Ctrl+=
Global zoom out Ctrl±

Window
Scope Function Shortcut key
Activate editor globally F12
Switch editor globally Ctrl+Shift+W
Previous editor globally Ctrl+Shift+F6
Previous view globally Ctrl+Shift+F7
Previous perspective globally Ctrl+Shift+F8
Global Next Editor Ctrl+F6
Global Next View Ctrl+F7
Global Next Perspective Ctrl+F8
Text Editor Show Ruler Context Menu Ctrl+W
Global Show View Menu Ctrl+F10
Global Show System Menu Alt±

Navigation
Scope Function Shortcuts
Java Editor Open Structure Ctrl+F3
Global Open Type Ctrl+Shift+T
Global Open Type Hierarchy F4
Global Open Declaration F3
Global Open External javadoc Shift+F2
Global Open Resource Ctrl+Shift+R
Global Back History Record Alt+←
Global Forward History Alt+→
Global Previous Ctrl+
Global Next Ctrl+.
Java Editor Show Outline Ctrl+O Global Open
Type in Hierarchy Ctrl+Shift+H Global
Go To Matching Bracket Ctrl+Shift+P
Go to the previous editing position globally Ctrl+Q
Go to the previous member in the Java editor Ctrl+Shift+↑
Go to the next member in the Java editor Ctrl+Shift+↓
Go to the line in the text editor Ctrl+L

Search
Scope Function Shortcuts
Global Appears in Files Ctrl+Shift+U
Globally Opens Search Dialog Ctrl+H
Declarations in Global Workspace Ctrl+G
References in Global Workspace Ctrl+Shift+G

Text editor
Scope function shortcut keys
Text editor rewrite switch Insert
Text editor scroll up Ctrl+↑
Text editor scroll down Ctrl+↓

File
Scope Function Shortcuts
Global Save Ctrl+X
Ctrl+S
Global Print Ctrl+P
Global Close Ctrl+F4
Global Save All Ctrl+Shift+S Global All
Close Ctrl+Shift+F4
Global Properties Alt+Enter
Global New Ctrl+N

Item
Scope Function Shortcut Key
Global Build All Ctrl+B

Source code
Scope function shortcut key

Run
Scope Function Shortcuts
Global Step Back F7
Global Step Over F6
Global Step In F5 Global Step
In Select Ctrl+F5 Global
Debug Last Started F11
Global Continue F8
Global Use Filter Step Shift+ F5
Globally add/remove breakpoints Ctrl+Shift+B
Globally display Ctrl+D
Globally run Last start Ctrl+F11
Globally run to line Ctrl+R
Globally execute Ctrl+U

Refactoring
Scope Function Shortcuts
Global Undo Refactoring Alt+Shift+Z
Global Extraction Method Alt+Shift+M
Global Extraction Local Variables Alt+Shift+L
Global Inline Alt+Shift+I
Global Move Alt+Shift+V Global
Redo Name Alt+Shift+R
Global Redo Alt+Shift+Y

Guess you like

Origin blog.csdn.net/youcheng_ge/article/details/130222952