IDEA2020.1常用配置說明
該配置基於IDEA2020.1版本,如後續有版本更新或者配置變更,再更新
idea64.exe.vmoptions配置
為提供IDEA啟動速度和效能,需修改該檔案中標紅的配置項
`-Xms2048m` # java heap初始值,建議將其與Xmx配置的一樣 `-Xmx2048m` # java heap最大值 `-XX:ReservedCodeCacheSize=1536m` # 預留儲存程式碼的記憶體空間 -XX:+UseConcMarkSweepGC # 老年代使用CMS垃圾回收策略(併發標記清除) -XX:SoftRefLRUPolicyMSPerMB=50 #每兆堆空閒空間中SoftReference的存活時間(單位:秒) -Xverify:none -ea # 開啟斷言 -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djava.net.preferIPv4Stack=true # 在使用ipv4的主機上執行ip6系統需開啟此項 -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djdk.attach.allowAttachSelf=true -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true
配置一些IDEA的配置、日誌、外掛儲存路徑.windows環境下預設儲存在C盤的使用者目錄下,由於會佔用較大空間,建議配置到其他目錄。
#--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.config.path=D:/Program Files/JetBrains/.IntelliJIdea/config #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.system.path=D:/Program Files/JetBrains/.IntelliJIdea/system #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.plugins.path=${idea.config.path}/plugins #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.log.path=${idea.system.path}/log
常用IDEA外掛
僅介紹日常使用的IDEA外掛,排名不分先後,根據字母順序排序
- Alibaba Java Coding Guidelines:阿里巴巴程式碼規範檢查外掛.當前版本為2.0.2。2.0.1版本將導致IDEA2020.1無法開啟設定頁面
- BashSupport:提供bash支援,支援執行配置、語法高亮、重新命名、文件查詢、檢查、快速修復等功能
- Chinese (Simplified) Language Pack EAP:IDEA官方漢化外掛,用於更好地瞭解IDEA的配置項。因為不少配置項仍未漢化,所以平常這個外掛都是置於disabled。
- Easy Code:基於IntelliJ IDEA開發的程式碼生成外掛,支援自定義任意模板(Java,html,js,xml)。支援資料庫型別與java型別對映關係配置;
- 支援同時生成生成多張表的程式碼。
- Extra Icons:為IDEA未設定圖示的檔案型別提供圖示配置。
- Free MyBatis plugin:增強idea對mybatis支援的外掛,支援生成mapper xml檔案、自動補全及語法錯誤提示和從mapper跳轉到mapper.xml
- Git Commit Template:git提交資訊模板
- Grep Console:日誌高亮顯示外掛
- Maven Helper:更好地管理maven依賴,解決maven衝突等問題
- Rainbow Brackets:給配對括號配置不同顏色外掛
- Translation:提供谷歌翻譯、有道翻譯、百度翻譯功能
IDEA詳細配置
僅介紹基於個人習慣而配置的一些選項
編輯頁面顯示記憶體使用情況
選單欄->View->Appearance->Status Bar Widgets->Memory Indicator
IDEA主題配置
File->Settings->Appearance & Behavior-> Appearance->Theme
IDEA 選單欄字型及大小配置
File->Settings->Appearance & Behavior-> Appearance->Use custom font
禁止自動開啟上次的專案
File->Settings->Appearance & Behavior->System Settings->Reopen last project on startup
IDEA編輯器主題配置
File->Settings->Editor-> Color Scheme->Shcheme
設定滑鼠懸浮提示: 當滑鼠懸浮與方法名時顯示方法引數等資訊
File->Settings->Editor-> Color Editing->Quick Documentation->Show quick documentation on mouse move
設定自動導包功能
File->Settings->Editor-> General->Auto Import->Java
Add unambiguous imports on the fly
:自動匯入不明確的結構;
Optimize imports on the fly
: 自動優化匯入的包
忽略大小寫提示
File->Settings->Editor-> General->Code Completion
取消單行tabs顯示
File->Settings->Editor-> General->Editor Tabs->Show tabs in one row
配置類的文件註釋資訊
File->Settings->Editor-> File and Code Templates->Includes
快捷鍵生成serialVersionUID
File->Settings->Editor->Inspections
設定檔案編碼
File->Settings->Editor->File Encodings
Global Encoding
: 全域性編碼
Project Encoding
: 專案編碼
建議全部設定為utf-8
配置自動編譯
File->Settings->Build,Execution,Deployment->Compiler
debug配置
File->Settings->Build,Deployment->Debugger
開啟該配置,可減少debug時的記憶體佔用
maven配置
File->Settings->Build,Deployment->Build Tools->Maven
maven home directory
: maven安裝目錄
User settings file
:maven配置檔案路徑
Local repository
:maven本地倉庫目錄
到此這篇關於IDEA2020.1常用配置說明的文章就介紹到這了,更多相關IDEA2020.1 配置內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!