Eclipse common shortcut keys

edit


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 (at this time the mouse can be anywhere in the current line, not necessarily the last) 
Ctrl+/ Comment the current line, press again to cancel the comment


choose


Alt+Shift+↑ Select the encapsulated 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 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 right word, 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 last used) 
Ctrl+Shift+K Refer to the selected word to quickly navigate to the previous one 
Ctrl+J Forward incremental search ( After pressing Ctrl+J, each letter editor you enter provides quick matching to locate a word. If not, it will display not found in the status bar. 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 Box 
Ctrl+G Declaration in Workspace 
Ctrl+Shift+G Reference in Workspace


navigation


Ctrl+Shift+T Search for classes (including projects and associated third jar packages) 
Ctrl+Shift+R Search for files in the project 
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 the open file


debugging


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 or remove the breakpoint at the current line 
Ctrl+R Run to the line (super easy to use, you can saves a lot of breakpoints)


refactor


(Generally, the shortcut keys for refactoring start with Alt+Shift) 
Alt+Shift+R Rename method name, property or variable name (this is one of my favorites, especially the Rename of variables and classes, which is better than The manual method can save a lot of labor) 
Alt+Shift+M Extract the code in a function into a method (this is one of the most common methods in refactoring, especially useful for a lot of mud code) 
Alt+Shift+ C Modify the function structure (more practical, there are N functions that call this method, modify it once) 
Alt+Shift+L Extract local variables (You can directly extract some magic numbers and strings into a variable, especially if it is called multiple times time) 
Alt+Shift+F Change the local variable in the Class into a field variable (a 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 How commonly used) 
Alt+Shift+Z Refactoring regret medicine (Undo)


other


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://43.154.161.224:23101/article/api/json?id=324599781&siteId=291194637