Preface
In Java development, we often use eclipse this software, familiar with some practical skills and shortcut keys, can help us to complete the work quickly, improve efficiency, use time to learn better, to further their own, below I will introduce some of the more commonly used shortcut keys.
1,ALT +? or alt+/: auto-complete code or prompt code
This is my most proud shortcut key combination, especially when the input syso a few characters, 2 fingers easily press the 2 keys, the automatic completion of the SYSTEM.OUT.PRINTLN (), and Eclipse default is "." The method hints, if the middle tip is broken and want to see again, you have to re-enter the corresponding class or variable in front of "." Before you can see the hint, but if the 2 key combination is the same can play the role of the hint, you can try, and if the input for after, if there is a need to traverse the local variables, will pop up to choose with for each traversal or for (int;; ) or while () and then automatically generate the code.
2.ctrl+o: Quick outline view
If you want to see the methods of the current class or a particular method, but do not want to pull the code down, and do not want to use the lookup function, it is very useful to use ctrl+o, especially directly open or trace to a very many methods of the class, this is very helpful, directly see those methods and member variables, It can list all the methods and properties in the current class, you just enter the method name you want to query, and click Enter to jump directly to where you want to go.
3.ctrl+shift+r: Open Resource List
This is probably the most time-saving in all shortcut key combinations, and I often use it, especially if you find a file directly in the project or workspace by name, this set of shortcuts lets you open any file in your workspace, and you just need to press the first few letters of the file name or mask name, such as applic* . Xml. The drawback is that this set of shortcuts is not available in all views.
4.ctrl+shift+f: Format code
The default 80 characters will be wrapped, this can be set. You can also reformat code based on code style, our team has a unified code format, we put it on our wiki. To do this, we open Eclipse, select the window Style, and then set the Code formatter,code style and organize Imports. Use the export feature to generate a configuration file. We put these profiles on the wiki, and everyone in the team is imported into their eclipse.
5.ctrl+e: Fast Conversion editor
This set of shortcuts will help you navigate between the open editors, especially when many files are open, and the ctrl+e will be more efficient and helpful.
6.ctrl+page down or ctrl+pageup: quick Switch between tabs
Can browse before and after the tab, if the use of skilled words, the individual page switch will be very fast, feel very good.
7,Shift+enter and Ctrl+shift+enter: Create a blank on the current line or below
Shift+enter creates a blank line below the current line, regardless of whether the cursor is at the end of the row. Ctrl+shift+enter inserts a blank line before the current line. These 2 shortcuts are also very helpful, at first you may not get used to, but after many times, you will feel very convenient, anyway I am.
8,ALT + key : Up or down the line to exchange content or the current line content to move up or down
This is also a magic weapon to save time. This combination moves the contents of the current line up or down. In the Try/catch section, this shortcut is especially useful.
9,ctrl+alt+ direction : Copy the highlighted row or lines
This is also very useful shortcut keys, it is very convenient to copy the current code to the previous line or the next line, I often use.
10.ctrl+m: Maximize the current edit page window
Large display screen can improve productivity is known to everyone. Ctrl+m is the shortcut key for maximizing the editor window, and pressing again restores the normal window.
11,ctrl+/: Automatically comment on the current line or select multiple lines
Automatically comment out the current line or multiple lines of code, with//comments, with ctrl+\ can uncomment.
12,ctrl+shift+/: Automatically comment out the selected code block
This note is used with/* */annotated (if it is a programming language code), development is also very useful, html,css, etc. can also use this comment, generate the corresponding annotation tag, with ctrl+shift+\ can uncomment.
13,ctrl+d: delete When moving forward
Delete the current line, this is very useful, I also often use, especially in debugging, delete the current error, combined with CTRL + Z editor undo shortcut Keys, with ease.
14,ctrl+shift+x and ctrl+shift+y: English letter Case Conversion
This shortcut key commonly used in the writing of SQL statements, I also often use, it is recommended that all the keywords in the SQL statement are capitalized, although the database case is not differentiated, but this is beneficial to others and their own reading especially SQL statements very long circumstances, and this look is also very normative.
15,Ctrl+shift+o: Automatically introduce the package and delete the useless package
16.del : Delete key
This key can be deleted one by one, in the word misspelled or a little need to modify the place to use
Common shortcut keys for Eclipse