以下配置可以導出、導入個人配置
導出個人配置文件 File > Export > General > Preferences,導入選擇Import > General .. 即可
背景豆沙綠設置
1. 直接設置系統背景色
2. 自己設置(比較麻煩)
代碼背景色
控制檯背景色 左邊項目背景色windows\preference\run/debug\console
左邊項目視圖背景設
字體設置
Windows -> Perspective -> Appearance -> Colors and Fonts -> Basic -> Text Font 修改爲11
將EGIT快捷圖標添加到工具欄
Windows -> Perspective -> Customize Perspective -> Action Set Availability 選擇Git
禁用 Maven updating indexes
Window => Preferences => Maven =>取消勾選的Download repository index updates on startup
去除不需要加載的模塊
Windows - Preferences - General - Startup and Shutdown 一般都沒用,可以都去掉。
取消自動校驗
Preferences - Validation 選中 Suspend all validators,需要驗證的時候右擊然後run validation即可。
添加快速構建代碼
Window->Preferences->Java->Editor->Templates-> New (Pattern可以參考sysout的寫)
修改 Eclipse 格式化的默認長度
Preferences->Java->Code Style->Formatter->Edit ->Line Wrapping->Maximum line width:默認80
Preferences -> Content Types 可以修改 Java Properties File 或者其他文件的默認編碼格式等
修改自定義快捷鍵
window -> preferences -> general -> keys,進入快捷鍵管理界面,比如如下配置
1. Ctrl + Shift + D :debug tomcat
2. Ctrl + R:debug
打開選中文件(文件夾,包)的當前目錄 (最新版neon已經集成,在查看屬性可以看到)點擊菜單欄上的Run--External Tools--External Tools Configurations...
進來這裏之後,直接雙擊左邊的Program
輸入以下內容(爲了避免寫錯,我建議複製下面的):
Name(Location):C:/WINDOWS/explorer.exe
Arguments:${container_loc}
切換到Common那裏,勾上External Tools,然後點擊Apply,再點擊Close即可。(會在工具欄顯示)
以後,選中文件/文件夾/包名,然後點擊工具欄的第二個Run以下圖標的右邊的三角符號,即可在資源管理器那裏打開所選的文件/文件夾/包名的所在目錄了
Eclipse Java 註釋模板設置詳解
取消塊註釋格式化
一般多行註釋我們都會使用塊註釋,比如/* */(快捷鍵:Ctrl+Shift+/),但是又不想代碼格式化的時候格式化到這個代碼的格式,可以設置 Windows->Preferences->Java->Code Style->Formatter->Edit->Comments,然後取消對“Enable block comment formatting"的勾選。
筆記本摺疊代碼快捷鍵
開啓摺疊功能,windows->perferences->General->Editors->Structured Text Editors 勾選 Enable folding,windows->perferences->Java->Editors->Folding 全部勾選。
修改默認快捷鍵,因爲筆記本沒有(Ctrl+Shift+Numpad_Divede(小鍵盤的/號) ),windows->perferences->general->key 裏找到Toggle Folding,修改爲Shift + Alt + - 。