原文地址:http://www.shortcutworld.com/en/win/Eclipse.html
常用的快捷键用红色字体高亮显示
Eclipse Shortcuts
Uploaded by bernd, updated on 6/14/2013 by csscouter
Platform: Windows/ English
PDF Print Hide all Show all
Table of Contents:
- Manage Files and Projects
- Editor Window
- Navigate in Editor
- Select Text
- Edit Text
- Search and Replace
- Indentions and Comments
- Editing Source Code
- Code Information
- Refactoring
- Run and Debug
- The Rest
1. Manage Files and Projects | Ctrl+NCreate new project using the WizardCtrl+Alt+nCreate new project, file, class, etc.Alt+f, then .Open project, file, etc.Ctrl+Shift+rOpen Ressource (file, folder or project)Alt+EnterShow and access file propertiesCtrl+sSave current fileCtrl+Shift+sSave all filesCtrl+wClose current fileCtrl+Shift+wClose all filesF5Refresh content of selected element with local file system▲ up
2. Editor Window | Focus/ cursor must be in Editor Window for these to work.F12Jump to Editor WindowCtrl+Page Down/Ctrl+Page UpSwitch to next editor / switch to previous editorCtrl+mMaximize or un-maximize current Editor Window (also works for other Windows)Ctrl+eShow list of open Editors. Use arrow keys and enter to switchCtrl+F6/Ctrl+Shift+F6Show list of open Editors. Similar to ctrl+e but switches immediately upon release of ctrlAlt+Arrow Left/Alt+Arrow RightGo to previous / go to next Editor WindowAlt+-Open Editor Window Option menuCtrl+F10Show view menu (features available on left vertical bar: breakpoints, bookmarks, line numbers, …)Ctrl+F10, then nShow or hide line numbersCtrl+Shift+qShow or hide the diff column on the left (indicates changes since last save)▲ up
3. Navigate in Editor | Home/EndJump to beginning / jump to end of indention. Press home twice to jump to beginning of lineCtrl+Home/EndJump to beginning / jump to end of sourceCtrl+Arrow Right/Arrow LeftJump one word to the left / one word to the rightCtrl+Shift+Arrow Down/Arrow UpJump to previous / jump to next methodCtrl+lJump to Line Number. To hide/show line numbers, press ctrl+F10 and select 'Show Line Numbers'Ctrl+qJump to last location editedCtrl+./Ctrl+,Jump to next / jump to previous compiler syntax warning or errorCtrl+Shift+pWith a bracket selected: jump to the matching closing or opening bracketCtrl+[+]/Ctrl+- on numeric keyboardCollapse / Expand current method or classCtrl+[/]/Ctrl+* on numeric keyboardCollapse / Expand all methods or classesCtrl+Arrow Down/Ctrl+Arrow UpScroll Editor without changing cursor position▲ up
4. Select Text | Shift+Arrow Right/Arrow LeftExpand selection by one character to the left / to the rightCtrl+Shift+Arrow Right/Arrow LeftExpand selection to next / previous wordShift+Arrow Down/Arrow UpExpand selection by one line down / one line upShift+End/HomeExpand selection to end / to beginning of lineCtrl+aSelect allAlt+Shift+Arrow UpExpand selection to current element (e.g. current one-line expression or content within brackets)Alt+Shift+Arrow Left/Arrow RightExpand selection to next / previous elementAlt+Shift+Arrow DownReduce previously expanded selection by one step▲ up
5. Edit Text | Ctrl+c/Ctrl+x/Ctrl+vCut, copy and pasteCtrl+zUndo last actionCtrl+yRedo last (undone) actionCtrl+dDelete LineAlt+Arrow Up/Arrow DownMove current line or selection up or downCtrl+Alt+Arrow Up / Ctrl+Alt+Arrow Down /Duplicate current line or selection up or downCtrl+DeleteDelete next wordCtrl+BackspaceDelete previous wordShift+EnterEnter line below current lineShift+Ctrl+EnterEnter line above current lineInsertSwitch between insert and overwrite modeShift+Ctrl+yChange selection to all lower caseShift+Ctrl+xChange selection to all upper case▲ up
6. Search and Replace | Ctrl+fOpen find and replace dialogCtrl+k/Ctrl+Shift+kFind previous / find next occurrence of search term (close find window first)Ctrl+hSearch Workspace (Java Search, Task Search, and File Search)Ctrl+j/Ctrl+Shift+jIncremental search forward / backwards. Type search term after pressing ctrl+j, there is now search windowCtrl + Shift + oOpen a resource search dialog to find any class▲ up
7. Indentions and Comments | Tab/Shift+TabIncrease / decrease indent of selected textCtrl+iCorrect indention of selected text or of current lineCtrl+shift+fAutoformat all code in Editor using code formatterCtrl+/Comment / uncomment line or selection ( adds '//' )Ctrl+Shift+/Add Block Comment around selection ( adds '/... */' )Ctrl+Shift+Remove Block CommentAlt+Shift+jAdd Element Comment ( adds '/** ... */')▲ up
8. Editing Source Code | Ctrl+SpaceOpens Content Assist (e.g. show available methods or field names)Ctrl+1Open Quick Fix and Quick AssistAlt+/Propose word completion (after typing at least one letter). Repeatedly press alt+/ until reaching correct nameCtrl+Shift+InsertDeactivate or activate Smart Insert Mode (automatic indention, automatic brackets, etc.)▲ up
9. Code Information | Ctrl+oShow code outline / structureF2Open class, method, or variable information (tooltip text)F3Open Declaration: Jump to Declaration of selected class, method, or parameterF4Open Type Hierarchy window for selected itemCtrl+tShow / open Quick Type Hierarchy for selected itemCtrl+Shift+tOpen Type in HierarchyCtrl+Alt+hOpen Call HierarchyCtrl+uFind occurrences of expression in current fileCtrl+move over methodOpen Declaration or Implementation▲ up
10. Refactoring | Alt+Shift+rRename selected element and all referencesAlt+Shift+vMove selected element to other class or file (With complete method or class selected)Ctrl+Shift+cChange method signature (with method name selected)Alt+Shift+mExtract selection to methodAlt+Shift+lExtract local variable: Create and assigns a variable from a selected expressionAlt+Shift+iInline selected local variables, methods, or constants if possible (replaces variable with its declarations/ assignment and puts it directly into the statements)▲ up
11. Run and Debug | Ctrl+F11Save and launch application (run)F11DebugF5Step Into functionF6Next step (line by line)F7Step outF8Skip to next Breakpoint▲ up
12. The Rest | Ctrl+F7/Ctrl+Shift+F7Switch forward / backward between views (panels). Useful for switching back and forth between Package Explorer and Editor.Ctrl+F8/Ctrl+Shift+F8Switch forward / backward between perspectivesCtrl+pPrintF1Open Eclipse Help