常用的 Eclipse 默認快捷鍵,總結如下:
原始碼類
這一類快捷鍵是我的最愛,可以極大的提高編程和重構效率,
| Command | Binding | Description |
|---|---|---|
| Quick Fix | Ctrl+1 | Suggest possible fixes for a problem |
| Content Assist | Alt+/ | 內容輔助(代碼提示) |
| Show Source Quick Menu | Alt+Shift+S | 重構 |
| Rename | Alt+Shift+R | 重命名 |
| Extract Function | aAlt+Shift+M | 抽取方法 |
| Organize Imports | Ctrl+Shift+O | 自動匯入類包 |
搜索類
Eclipse 這類 IDE 區別于其它文本編輯器(如 Vim、UE、EP、Notepad2 等)的一大優勢是擁有強大的參考和搜索功能,
| Command | Binding | Description |
|---|---|---|
| Incremental Find | Ctrl+J | 增量搜索 |
| Incremental Find Reverse | Ctrl+Shift+J | 反向搜索 |
| Go to Line | Ctrl+L | 定位到指定行 |
| Open Search Dialog | Ctrl+H | 打開搜索對話框 |
| Open Resource | Ctrl+Shift+R | 開發目標資源檔案 |
| Open Call Hierarchy | Ctrl+Alt+H | 查找指定元素的呼叫堆疊 / Open a call hierarchy on the selected element |
| Show Occurrences in File Quick Menu | Ctrl+Shift+U | 在當前檔案中查找指定元素的參考 |
| References in Workspace | Ctrl+Shift+G | 在作業空間中查找指定元素的參考 |
文本編輯類
偷懶者必備,
| Command | Binding | Description |
|---|---|---|
| Delete Line | Ctrl+D | 洗掉當前行 |
| Toggle Comment | Ctrl+/ | 注釋當前行 |
| Move Lines Up | Alt+↑ | 將選定行上移 |
| Move Lines Down | Alt+↓ | 將選定行下移 |
| Duplicate Lines | Ctrl+Alt+↑ | 復制選定行 |
| Copy Lines | Ctrl+Alt+↓ | 復制選定行 |
| To Upper Case | Ctrl+Shift+X | 將所選區域字母設定為大寫 |
| To Lower Case | Ctrl+Shift+Y | 將所選區域字母設定為小寫 |
| Toggle Block Selection | Alt+Shift+A | 塊編輯功能 / Toggle block / column selection in the current text editor |
其它類
| Command | Binding | Description |
|---|---|---|
| Backward History | Alt+← | 前一個編輯頁面 / Move backward in the editor navigation history |
| Forward History | Alt+→ | 后一個編輯頁面 / Move forward in the editor navigation history |
| Scroll Line Up | Ctrl+↑ | 向上滾動一行文本 / Scroll up one line of text |
| Scroll Line Down | Ctrl+↓ | 向下滾動一行文本 / Scroll down one line of text |
| Maximize Active View or Editor | Ctrl+M | 全屏 / Toggles maximize/restore state of active view or editor |
| Properties | Alt+Enter | Display the properties of the selected item |
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/254970.html
標籤:其他
