Eclipse shortcut keys

Source: Internet
Author: User

common shortcut keys

shortcut Keys function
Ctrl+f Find and replace
Ctrl+shift+k Find Previous (text editor)
Ctrl+k Find Next (text editor)
CTRL + Z Revoke
CTRL + C Copy
Alt+shift+↓ Restore previous Selection
Ctrl+x Shear
Ctrl1+1 Quick fix
alt+/ Content assistance
CTRL + A Select All
Delete Delete
ALT +? Contextual information
F2 Display ToolTip description (Java editor)
Alt+shift+↑ Select encapsulated Element (Java Editor)
alt+shift+← Select Previous Element (Java Editor)
alt+shift+→ Select the next element (Java Editor)
Ctrl+j Incremental lookup (text editor)
Ctrl+shift+j Incremental reverse lookup (text editor)
CTRL + V Paste
Ctrl+y Redo
ctrl+= Amplification
ctrl+- Narrow
Ctrl+s Save
Ctrl+p Print
Ctrl+f4 Shut down
Ctrl+shift+s Save All
Ctrl+shift+f4 Close all
Alt+enter Property
CTRL + N New
Ctrl+b Build All

Tool Bar

shortcut Keys function
F12 Activating the editor
Ctrl+shift+w Toggle Editor
Ctrl+shift+f6 Previous editor
Ctrl+shift+f7 Previous view
Ctrl+shift+f8 Previous perspective
Ctrl+f6 Next editor
Ctrl+f7 Next view
Ctrl+f8 Next Perspective view
Ctrl+w Show Ruler context menu (text editor)
Ctrl+f10 Show View Menu
alt+- Show System Menu
Ctrl+f3 Open structure (Java Editor)
Ctrl+shift+t Open type
F4 Open type Hierarchy
F3 Open declaration
Shift+f2 Open External Javadoc
Ctrl+shift+r Open Resource
alt+← Back history
alt+→ Forward historical record
CTRL +, Last
CTRL +. Next
Ctrl+o Show outline (Java editor)
Ctrl+shift+h Open a type in a hierarchy
Ctrl+shift+p Go to matching parentheses
Ctrl+q Go to previous edit location
Ctrl+shift+↑ Go to previous member (Java editor)
Ctrl+shift+↓ Go to next member (Java editor)
Ctrl+l Go To Line (text editor)
Ctrl+shift+u Appears in the file
Ctrl+h Open the Search dialog box
Ctrl+g Claims in the workspace
Ctrl+shift+g References in the workspace
Insert Overwrite Toggle (text editor)
Ctrl+↑ Roll up rows (text editor)
Ctrl+↓ Roll down rows (text editor)

developing shortcut keys

shortcut Keys function
Ctrl+shift+f Formatting (Java Editor)
ctrl+\\ Uncomment (Java editor)
ctrl+/ Comments (Java Editor)
Ctrl+shift+m Add import (Java editor)
Ctrl+shift+o Organization Import (Java editor)
Ctrl+1 Auto Fix (Java editor)
F7 Single Step Back
F6 Single-Step Skip
F5 Single-Step jump in
Ctrl+f5 Single-Step jump in selection
F11 Debug Last Boot
F8 Go on
Shift+f5 Single Step with filter
Ctrl+shift+b Add/Remove Breakpoints
Ctrl+d Show
Ctrl+f11 Run last Boot
Ctrl+r Run To Line
Ctrl+u Perform
Alt+shift+z Undo Refactoring
Alt+shift+m Extraction method
Alt+shift+l Extracting Local variables
Alt+shift+i Inline
Alt+shift+v Move
Alt+shift+r Renaming
Alt+shift+y Redo

other shortcut keys

shortcut Keys function
Ctrl+1 Quick fix
Ctrl+3 Universal access key
Ctrl+d Delete When moving forward
Ctrl+shift+l View shortcut keys
Ctrl+alt+↓ Copy the current row to the next row (copy incremented)
Ctrl+alt+↑ Copy the current line to the previous row (copy incremented)
Alt+↓ The current line and the following line interact with the position
Alt+↑ The current line and the previous row interaction position
alt+← Previous edited page
alt+→ Next Editor's page
Alt+enter Displays the properties of the currently selected resource (project, file, file)
Shift+enter Inserts a blank line on the next line in the current row
Shift+ctrl+enter Inserts a blank line in the current row
Ctrl+q Navigate to the last edited place
Ctrl+l Position in a row
Ctrl+m Maximize the current edit or view
ctrl+/ Comment on the current line, and then cancel the comment
Ctrl+o Quick Display Outline
Ctrl+t Quickly display the inheritance structure of the current class
Ctrl+w Close current Editer
Ctrl+k Refer to the selected word to quickly navigate to the next
Ctrl+e Quick display of the current Editer drop-down list
ctrl+/(keypad) Collapse all code in the current class
Ctrl+x (keypad) Expands all code in the current class
Ctrl+space Code helper to do some code insertion
Ctrl+shift+e Displays the manager that manages all of the currently open view
Ctrl+j Forward Incremental Lookup
Ctrl+shift+j Reverse Incremental Lookup
Ctrl+shift+f4 Close all open editer
Ctrl+shift+x Capitalize the currently selected text
Ctrl+shift+y Turns the currently selected text all lowercase
Ctrl+shift+f Formatting the current Code
Ctrl+shift+p Locate the match for (for example, {})
Alt+shift+r Renaming
Alt+shift+m Extraction method
Alt+shift+c Modify function structure
Alt+shift+l Extracting Local variables
Alt+shift+f Change the local variable in class to a field variable
Alt+shift+i Merge variables
Alt+shift+v Moving functions and variables
Alt+shift+z Reconstruction of the regret medicine

  1. 1. Ctrl+shift+r: Open Resource

    This is probably the most time-saving combination of all shortcut keys. This set of shortcuts lets you open any file in your workspace, and you only 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.

  2. 2. Ctrl+o: Fast Outline

    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 search function, then use Ctrl+o bar. 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. 3. Ctrl+e: Quick Convert Editor

    This set of shortcut keys will help you navigate between the open editors. Use ctrl+page down or ctrl+page up to browse the tabs before and after, but ctrl+e is more efficient when many files are open.

  4. 4. Ctrl+2,l: Assigning a value to a local variable

    During development, I often write methods, such as calendar.getinstance (), and then assign the results of a method to a local variable by ctrl+2 shortcut keys. This saves me the input class name, the variable name, and the time the declaration was imported. The ctrl+f effect is similar, but the effect is to assign the result of the method to a field in the class.

  5. 5. Alt+shift+r: Renaming

    Renaming properties and methods was a hassle a few years ago, requiring a lot of searching and replacing so that the code became fragmented. Today's Java IDE provides source-processing functionality, as is eclipse. Now, the renaming of variables and methods is very simple, and you'll get used to renaming each time a better alternative name appears. To use this feature, move the mouse over the property name or method name, press Alt+shift+r, enter a new name, and then click Enter. This is done. If you rename a property in the class, you can click Alt+shift+r two times, this will call out the Source Processing dialog box, you can implement the get and set method of automatic renaming.

  6. 6. Alt+shift+l and Alt+shift+m: Extracting local variables and methods

    Source processing also includes the ability to extract variables and methods from chunks of code. For example, to create a constant from a string, select the text and press Alt+shift+l. If the same string appears elsewhere in the same class, it is automatically replaced. The method extraction is also a very convenient function. Breaking up large methods into smaller, well-defined methods can greatly reduce complexity and improve the testability of your code.

  7. 7. Shift+enter and Ctrl+shift+enter

    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.

  8. 8. ALT + arrow key

    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. 9. Ctrl+m

    Large display screen can improve productivity is known to everyone. Ctrl+m is the shortcut key for maximizing the editor window.

  10. CTRL +. And Ctrl+1: Next error and quick change

    CTRL +. Moves the cursor to the next report fault or warning in the current file. This set of shortcut keys I generally use with ctrl+1, that is, modify the proposed shortcut keys. The new version of Eclipse suggestions are good to help you solve a lot of problems, such as missing parameters in the method, Throw/catch exception, non-executed methods and so on.

    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+page up: 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, control+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

    This shortcut is also very convenient, when we use a class in another package, if the corresponding package or class is not introduced, there will be a red wavy line hint, at this time we can press this shortcut, red hints automatically disappear back to normal, if there are more than one containing the same class, then you will be prompted to choose, If there is no use of the package to introduce the situation, usually the code copied to copy to create more, can also be quickly removed with this key.


    Attach some tips:

    Lock Command Line window: In the Command line view (Window->show view->other->basic->console), try using the SCROLL LOCK button to lock the console output without scrolling.

    Using Ant view: In my Java or debug mode, I like to show the ant view so I can run the ant task quickly. This view can be found through window ant. Place the ant view in the corner of the screen and add the Build.xml file with the add compiled file (addàotheràshow viewàbuildfiles) button. In version 3.1, even the Ant debug scripting language is supported.

    Automatically traverse a collection: For + control-space: If you do not yet know, then you should remember that Control-space is the AutoComplete feature. In Eclipse, you can also automate the structure. In an array or collection range, try entering "for" and then pressing the Control-space key. Eclipse will ask you which collection you want to traverse and automatically complete the loop code.

    Using hierarchical layouts: The default layout (flat) In Package Explorer View makes me confused, and it shows the full name of the package in the Navigation tree (navigation). I prefer the package and file system view of my source code, which is called the hierarchical layout (hierarchical layouts) in eclipse. To switch to this mode, click the Down button in the package browse view, select Layout, and then select Rating (hierarchial).

    Show multiple files at once: You can browse multiple files at once. You can open an edit window that is not in the active state by dragging it to the bottom of the active window or to the scroll bar on the side. This is the best way I can describe the trick.

    Open two eclipse simultaneously: to merge the changes from one CVS branch to another, I like to do this by opening two working directories (Workspace) to different eclipse. This way I can see all the changes by comparing the latest version on CVS (right-click the project and then select Compare lastest from HEAD) and then merge each change into another CVS branch. The simplest way to start multiple eclipse is to take advantage of Eclipseàwith Launcher.

    Implementors plugin: Installs a plug-in that can jump to an implementation of an interface. If you're a dependency injection fan, or you're working on an excellent interface, you'll need a plugin like this to speed up code navigation. You can find this plugin in SourceForge.

    Automatically generate getter and setter methods: in the corresponding Pojo, right-click on the space, select "Source", then select "Generate Getters and Setters", and then choose which properties you have to generate such a method, click "OK" is OK, Especially in the case of very many member variables, it saves time.

    Attach Eclipse shortcut key Daquan:

    Ctrl+1 Quick Fix (the most classic shortcuts, you don't have to say more)

    Ctrl+d: Delete When moving forward

    Ctrl+alt+↓ Copy the current row to the next row (replication incremented)

    Ctrl+alt+↑ Copy the current line to the previous row (replication incremented)

    Alt+↓ the current line and the next line of interaction (especially useful, can be omitted first cut, then pasted)

    Alt+↑ the current line and the upper row interaction position (IBID.)

    alt+← the previous edited page

    alt+→ next Edit page (of course, for the above article)

    Alt+enter displays the properties of the currently selected resource (project, or file or file)

    Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)

    Shift+ctrl+enter Insert blank line in current line (principle above)

    Ctrl+q positioning to the last edited place

    Ctrl+l positioning in a row (for people with programs over 100 have the gospel)

    Ctrl+m maximize the current edit or view (and vice versa)

    ctrl+/comment on the current line, and then uncomment it

    Ctrl+o Quick Display OutLine

    Ctrl+t quickly displays the inheritance structure of the current class

    Ctrl+w Closing the current editer

    Ctrl+k the selected word quickly navigates to the next

    Ctrl+e quick display of the current Editer drop-down list (in bold if the current page does not appear)

    ctrl+/(numpad) collapses all code in the current class

    Ctrl+x (keypad) expands all code in the current class

    Ctrl+space Code Helper to complete the insertion of some code (but the general and IME conflict, you can modify the input method hotkey, you can also take up alt+/to replace)

    Ctrl+shift+e Display manager that manages all of the currently open view (you can choose to close, activate, and so on)

    Ctrl+j forward Incremental lookup (after pressing CTRL+J, each letter editor you enter provides a quick match to navigate to a word, if not, it is not found in the Stutes line, check a word, especially useful, this function idea two years ago)

    CTRL+SHIFT+J Reverse incremental lookup (same as above, except forward)

    Ctrl+shift+f4 Close all open editer

    Ctrl+shift+x the text that is currently selected is all stale lowercase

    Ctrl+shift+y turns the currently selected text to lowercase

    Ctrl+shift+f formatting of the current code

    Ctrl+shift+p position to the match (for example {}) (after locating from the front, the cursor is in the match, back to front, or vice versa)

    The following shortcut keys are commonly used in refactoring, I like and commonly used to tidy up (note: General refactoring of the shortcut keys are alt+shift beginning of the)

    Alt+shift+r rename (is my own favorite, especially the variables and classes of rename, than the manual method can save a lot of labor)

    Alt+shift+m Extraction Method (This is one of the most common methods of refactoring, especially useful for a whole bunch of mud codes)

    Alt+shift+c Modify the function structure (more practical, there are n functions called this method, modified once done)

    Alt+shift+l extract Local variables (you can directly extract some magical numbers and strings into a variable, especially when multiple calls are made)

    Alt+shift+f change the local variable in class to a field variable (more useful function)

    Alt+shift+i Merge variables (this may be a bit inappropriate inline)

    ALT+SHIFT+V moving functions and variables (not commonly used)

    Alt+shift+z reconstruction of Regret medicine (Undo)

Eclipse shortcut keys

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.