Eclipse common shortcut keys

Ctrl+1 Quick fix (the most classic shortcut, needless to say, can solve many problems, such as import class, try catch surround, etc.)
Ctrl+Shift+F Format current code
Ctrl+Shift+M Add class import Import
Ctrl+Shift+O Organization class import import (both the role of Ctrl+Shift+M, and can help you remove useless imports, very useful)
Ctrl+Y Redo (opposite to undo Ctrl+Z)
Alt+/ Content assist (it saves you how many times of keystrokes, it is too common)
Ctrl+D Delete the current line or multiple lines
Alt+↓ The interaction position between the current line and the following line (especially practical, you can save cutting and pasting first)
Alt+ ↑ The interactive position of the current line and the previous line (same as above)
Ctrl+Alt+↓ Copy the current line to the next line (copy increase)
Ctrl+Alt+↑ Copy the current line to the previous line (copy increase)
Shift+Enter Insert a blank in the next line of the current line Line (the mouse can be anywhere in the current line, not necessarily the last)
Ctrl+/ Comment the current line, press again to cancel the comment

Select
Alt+Shift+↑ Select the package element
Alt+Shift+← Select the previous element
Alt+Shift+→ Select the next element
Shift+← Select the character from the cursor to the left
Shift+→ Select the character from the cursor to the right
Ctrl+Shift+← Select the word to the left of the cursor
Ctrl+Shift+→ Select the word next to the cursor

Move
Ctrl+← Move the cursor to the beginning of the word on the left, equivalent to vim's b
Ctrl+→ Move the cursor to the end of the word on the right, equivalent to vim's e

Search
Ctrl+K Refer to the selected word to quickly Navigate to the next one (if the word is not selected, search for the word that was used last time)
Ctrl+Shift+K Refer to the selected word to quickly navigate to the previous one
Ctrl+J Search forward incrementally (after pressing Ctrl+J, you Each letter editor input provides quick matching to locate a word. If not, it will display in the status bar that it is not found. It is especially useful when looking up a word. To exit this mode, press escape)
Ctrl+ Shift+J Reverse incremental search (same as the previous one, but from back to front)
Ctrl+Shift+U List all lines containing strings
Ctrl+H Open search dialog
Ctrl+G Workspace Declare
Ctrl+Shift+G references in workspace

Navigate
Ctrl+Shift+T Search for classes (including projects and associated third jars)
Ctrl+Shift+R Search for files in projects
Ctrl+E Quickly display the drop-down list of the current Editor (If the current page is not displayed in bold)
F4 Open the type hierarchy
F3 Jump to the declaration
Alt+← Previous edited page
Alt+→ Next edited page (of course for the above one)
Ctrl+PageUp/PageDown In the editor, switch open files

Debug
F5 Step into
F6 Step over
F7 Step back to
F8 Continue
Ctrl+Shift+D Display the value of the variable
Ctrl+Shift+B Set the current line Or remove the breakpoint
Ctrl+R to run to the line (super easy to use, can save a lot of breakpoints)

refactoring (generally, the shortcut keys for refactoring start with Alt+Shift)
Alt+Shift+R Rename the method name, Attribute or variable name (it is my favorite one, especially the Rename of variables and classes, which can save a lot of labor than manual methods)
Alt+Shift+M Extract the code in a function into a method (this is refactoring One of the most commonly used methods in it, especially useful for a lot of mud code)
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 multiple times)
Alt+Shift+F Change the local variable in the Class to a field variable (a more practical function)
Alt+Shift +I Merge variables (may be a bit inappropriate to say Inline)
Alt+Shift+V Move functions and variables (not very common)
Alt+Shift+Z Refactoring regret medicine (Undo)

Others
Alt+Enter Displays the properties of the currently selected resource. This shortcut is used to view the properties of the file under Windows. It is usually used to view the actual path of the file in Windows.
Ctrl+↑ Scroll up the
text editor Ctrl+↓ Scroll down the text editor
Ctrl +M Maximize the current Edit or View (press again and vice versa)
Ctrl+O Quickly display OutLine (for students who do not open the Outline window, this shortcut key is essential)
Ctrl+T Quickly display the inheritance structure of the current class
Ctrl+ W closes the current Editor (this is also the case for closing the open dialog under windows, as well as qq, Wangwang, browser, etc.)
Ctrl+L Text editor goes to line
F2 Display tooltip description

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327084570&siteId=291194637