1.Ctrl+ S: Save code quickly

Be sure to use Ctrl+ S to save our code anytime, anywhere!! Otherwise, when the computer is shut down or the Eclipse used suddenly flash back to tears. Beep beep beep beep beep beep beep beep beep beep

Alt+/: Auto-complete the code or prompt the second half of the code

Wall crack recommended we use ah, really is super easy to use. To give you an example, when we type: system.out.println (); Those who don’t know the shortcut may be typing letter by letter, worrying about which word they misspell. When you use Alt+/ just type syso and Alt+/. It only takes 1 second to complete this sentence, so fast, incredibly fast!

3.Ctrl+ Shift + O: Automatically introduce missing packages in code or delete useless packages

When we use classes in packages, we are required to import them with import statements. But there are so many kinds of bags that I can’t remember them all. Ctrl+ Shift + O shortcuts are needed.

Use the Scanner input statement as an example:

4.Ctrl+ D: Delete the current line

If you do not know this shortcut key, when you want to delete a row, you need to select the row with the mouse before deleting it. Switching from keyboard to mouse is a hassle.

Once we know the shortcut, we simply place the cursor anywhere on the line to delete.

5. Two quick comment key combinations

  • Ctrl+/ : Automatically comments the current line or selected lines (uncomment by pressing Ctrl+/ again).

  • Ctrl+ Shift +/ : Automatically comments out selected code blocks. Uncomment them with Ctrl+ Shift +\. (You need more than 1 line of code to use this key combination.)

    When commenting, you must also select the pair of {} where the code block is located to avoid the formatting of the code after commenting!!

    Pay special attention to: Even if the code has been commented with Ctrl+/, when using Ctrl+ Shift +/ to comment, just select {} where the code block is located to avoid formatting changes after annotation.

6.Ctrl+ Shift + F: Format code

When you’re new to code, you probably don’t have a format at all. The typed code is so badly formatted that we may not understand it when we read it again. You need a set of shortcuts to quickly format your code. If the sogou input method is used, press Ctrl+ Shift + F to disable the sogou input method.

7.Ctrl+ Z (Undo) and Ctrl+ Y (Undo)

We commonly used universal undo key, combined with other key combinations, is really convenient

8. Two shortcut keys to create a blank line (The cursor can be created anywhere on the line)

  • Ctrl+shift+enter: (Creates a blank row on the current row)
  • shift+enter: (Creates a blank line under the current line)

9.Alt+ arrow key up and down: Exchanges content up and down the line or moves the current line up or down

How can you select a row quickly and still move the selected row up or down? Alt+ arrow key up and down can quickly achieve.

10.Ctrl+Alt+ Arrow up or down keys: Copies one or more lines at the cursor position

  • Copies the line where the cursor is located(The cursor can be created anywhere on the line)
  • Copy the selected rows

The commonly used Eclipse shortcut keys have been introduced, next for you to attach the full Eclipse shortcut keys for your reference.


Common Eclipse shortcuts are excerptedNovice tutorial

shortcuts describe
The editor
Ctrl+1 Quick fixes (the most classic shortcuts, needless to say, can solve many problems, such as import classes, try catch enclosing, etc.)
Ctrl+Shift+F Formatting the current code
Ctrl+Shift+M Add an import import for the class
Ctrl+Shift+O Organize class import (both Ctrl+Shift+M and remove unnecessary imports, useful)
Ctrl+Y Redo (as opposed to undoing Ctrl+Z)
Alt+/ Content assist (saves you a lot of typing, too often)
Ctrl+D Deletes the current row or more rows
Alt + left Where the current line interacts with the next line (especially useful, you can skip cutting and pasting)
Alt + write Where the current line interacts with the previous line (ditto)
Ctrl + Alt + left Copy current row to next row (copy increment)
Ctrl + Alt + write Copy current row to previous row (copy increment)
Shift+Enter Insert a blank line next to the current line (the mouse can be anywhere on the current line, not necessarily at the end)
Ctrl+/ Comment the current line and press to uncomment it
choose
Alt + Shift + write Select encapsulating elements
Alt + Shift + please Select the previous element
Alt + Shift + – > Select the next element
Shift + please Select characters left from the cursor
Shift + – Select characters from the cursor to the right
Ctrl + Shift + please Select the word to the left of the cursor
Ctrl + Shift + – > Select the word to the right of the cursor
mobile
Ctrl + please The cursor moves to the beginning of the word on the left, which corresponds to the B of vim
Ctrl + – The cursor moves to the end of the word on the right, equivalent to the E for vim
search
Ctrl+K Refer to the selected Word to quickly navigate to the next one (if Word is not selected, search the Word that was searched last time)
Ctrl+Shift+K Refer to the selected Word to quickly locate the previous one
Ctrl+J Forward delta search (After pressing Ctrl+J, the editor for each letter you type provides a quick match to locate the word, if not, it will appear as not found in the status bar. This is especially useful when looking up a word. To exit this mode, press Escape.)
Ctrl+Shift+J Reverse incremental lookup (same as above, but backwards)
Ctrl+Shift+U Lists all lines that contain strings
Ctrl+H The search dialog box is displayed
Ctrl+G Declaration in workspace
Ctrl+Shift+G References in workspace
navigation
Ctrl+Shift+T Search classes (including projects and associated third JAR packages)
Ctrl+Shift+R Search for files in the project
Ctrl+E Quick display of the current Editer drop-down list (boldface if the current page is not displayed)
F4 Open the type hierarchy
F3 Jump to declaration
Alt + please Previous edited page
Alt + – Next edited page (for the one above, of course)
Ctrl+PageUp/PageDown In the editor, switch files that are already open
debugging
F5 Step into
F6 Single step over
F7 One step back
F8 Continue to
Ctrl+Shift+D Displays the value of a variable
Ctrl+Shift+B Set or remove breakpoints on the current line
Ctrl+R Run to line (super useful, can save a lot of breakpoints)
Refactoring (Most refactoring shortcuts start with Alt+Shift)
Alt+Shift+R Rename a method name, property, or variable name (my favorite, especially Rename variables and classes, which saves a lot of labor than manual methods)
Alt+Shift+M Extracting code from a function into a method (this is one of the most common methods used in refactoring, especially for large chunks of code)
Alt+Shift+C Modify function structure (more practical, there are N functions called this method, modify it once.)
Alt+Shift+L Extract local variables (it is possible to extract magic numbers and strings directly into a variable, especially if multiple calls are made)
Alt+Shift+F Change a local Class variable to a field variable.
Alt+Shift+I Merge variables (maybe a little inappropriately Inline)
Alt+Shift+V Move functions and variables (not very often)
Alt+Shift+Z The Undo of Reconstruction
other
Alt+Enter Displays the properties of the currently selected resource. View File properties in Windows is this shortcut, usually used to view the actual path of the file in Windows
Ctrl + write Roll lines in a text editor
Ctrl + left The text editor rolls down the line
Ctrl+M Maximize the current Edit or View (or vice versa)
Ctrl+O Quickly display OutLine (this shortcut is essential for those who do not open the OutLine window)
Ctrl+T Quickly display the inheritance structure of the current class
Ctrl+W Close the current Editer (Windows closed open dialog box is also this, as well as QQ, Wangwang, browser, etc.)
Ctrl+L The text editor goes to the line
F2 Displays the tooltip description

If you think xiaoqiao’s writing is good, please help me like it and collect it. Your praise, collection is my biggest power ~

Pay attention to xiaoqiao public number [Xiaoqiao programming content sharing station] continue to update, more Java dry goods waiting for you to learn!