設(shè)置項(xiàng)
這個(gè)版本已經(jīng)取消了defalut settings指定成默認(rèn)配置的選項(xiàng),所以配置都是在settings中配置
設(shè)置項(xiàng)
設(shè)置統(tǒng)一utf-8編碼
- 路徑:file -> settings --> editor --> file encodings
- 勾選transparent native-to-ascii conversion : 解決比如properties 文件中的unicode亂碼
設(shè)置默認(rèn)jdk
- 路徑:file-> project structure
- 設(shè)置平臺(tái)的sdks --> apply 即可;
下次導(dǎo)入的工程
都默認(rèn)用這個(gè)jdk
設(shè)置eclipse 代碼格式化xml 文件
老的統(tǒng)一格式化代碼配置,都還用的eclipse的配置文件,這個(gè)設(shè)置可以做個(gè)兼容
- 首先要下載插件: eclipse code formatter
- 路徑:file -> settings --> other settings–> eclipse code formatter
設(shè)置統(tǒng)一的java類文件頭注釋
- 路徑:file -> settings --> editor --> file and code templates
- includes 標(biāo)簽頁(yè) --> file header
工程包路徑展示 , flatten package
這個(gè)看個(gè)人習(xí)慣:看習(xí)慣了eclipse的包路徑結(jié)構(gòu):剛看idea會(huì)不習(xí)慣。
快捷鍵設(shè)置成eclipse快捷鍵
- 這個(gè)功能看人習(xí)慣,不建議設(shè)置,習(xí)慣idea快捷鍵就好。
- 路徑:file -> settings --> keymap
修改alt + / 的代碼提示快捷鍵
找到code -> basic 項(xiàng)修改其快捷鍵
降級(jí)idea的代碼檢查設(shè)置
- idea的特點(diǎn),各種代碼檢查,甚至注釋都有很好的檢查,方便開發(fā)編碼時(shí)發(fā)現(xiàn)錯(cuò)誤。這個(gè)里面設(shè)置項(xiàng)非常多,可以按需設(shè)置檢查提示
- 降級(jí)public方法或者public變量,工程中未使用的錯(cuò)誤提示;
如下圖
路徑:file -> settings–> editor -> inspections 設(shè)置方法:找到 java項(xiàng) -> declaration redundancy -> unused declaration 將filed 和method 的級(jí)別調(diào)到 private
配置maven
- 路徑:file -> build,execution,deployment -> build tools --> maven
- 指定maven home 和setting.xml 路徑
- 注意點(diǎn) :設(shè)置的settings.xml必須在maven安裝目錄的conf下面。
因?yàn)樵趫?zhí)行mvn命令時(shí)只會(huì)在conf下找settings
maven編譯啟動(dòng)控制臺(tái)中文亂碼設(shè)置
問(wèn)題現(xiàn)象如下圖
- 設(shè)置路徑:file -> build,execution,deployment -> build tools --> maven --> runner
- vmoptions: -dfile.encoding=gb2312
設(shè)置完結(jié)果展示
設(shè)置git
- 前提是本地必須安裝好git的客戶端
- 配置路徑:file -> version control --> git
- 指定git.exe的應(yīng)用程序
設(shè)置svn
- 前提是本地必須安裝好svn的客戶端
- 設(shè)置路徑:file -> version control --> subversion
- 指定svn.exe的應(yīng)用程序
設(shè)置自動(dòng)編譯
- idea 不像eclipse,保存文件,會(huì)自動(dòng)編譯;可以進(jìn)行下面設(shè)置
- 設(shè)置路徑:file -> settings ->build,execution,deployment -> compiler
- 勾上build project automatically選項(xiàng)
編輯器設(shè)置批量import包
- 可不設(shè)置,按需
- 路徑:file -> settings --> editor --> general --> auto import
設(shè)置run程序不檢查全部類的錯(cuò)誤
idea 在項(xiàng)目啟動(dòng)時(shí),會(huì)檢查整個(gè)工程是否有編譯錯(cuò)誤,如果有,不管是否影響當(dāng)前類的運(yùn)行,都會(huì)運(yùn)行失敗。比如:mainclass為要運(yùn)行的正常類,目錄下存在一個(gè)類errorclass有錯(cuò)誤,運(yùn)行mainclass時(shí)會(huì)無(wú)法運(yùn)行。 現(xiàn)在需要忽略errorclass中的錯(cuò)誤,執(zhí)行mainclass中的代碼。
說(shuō)明:新的版本做過(guò)多種設(shè)置嘗試,沒(méi)有能實(shí)現(xiàn)的了。只能單獨(dú)建個(gè)工程做main測(cè)試(坑啊)
設(shè)置工作區(qū)多標(biāo)簽
路徑:file -> settings ->build,execution,deployment -> compiler
設(shè)置idea上網(wǎng)代理
路徑:file -> settings ->appearance & behavior -> system settings -> http proxy
到此這篇關(guān)于intellij idea 2020.3 配置教程詳解的文章就介紹到這了,更多相關(guān)idea 2020.3 配置內(nèi)容請(qǐng)搜索服務(wù)器之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持服務(wù)器之家!