初學java,idea走一波先。安裝完成,配置配置項.java
官方下載地址:https://www.jetbrains.com/idea/download/#section=windows git
我盤裏面的,時間久啦就老啦。忽略。windows
版本intellij-idea
IntelliJ IDEA 2019.1.3 (Ultimate Edition)
Build #IU-191.7479.19, built on May 28, 2019
Licensed to jetbrains js
Subscription is active until November 27, 2019
JRE: 1.8.0_202-release-1483-b58 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0app
連接:https://pan.baidu.com/s/1Oy1Pr_XrMybEg8WmYtLjaA
提取碼:7nvg ide
Path: C:\Program Files\Java\jdk1.8.0_162\bin
CLASSPATH: C:\Program Files\Java\jdk1.8.0_162\lib
JAVA_HOME C:\Program Files\Java\jdk1.8.0_162svn
1.idea設置:File->Settings->Editor->File and Code Templates工具
選中Includes標籤:選中File Header,修改成 開發工具
/**
* @author ${USER}
* @date ${DATE} ${TIME}
*/ 字體
修改Files,依次編輯Class,Interface,Enum等經常使用java類型,修改成
/*
* Copyright ${YEAR} tu.cn All right reserved. This software is the
* confidential and proprietary information of tu.cn ("Confidential
* Information"). You shall not disclose such Confidential Information and shall
* use it only in accordance with the terms of the license agreement you entered
* into with Tu.cn
*/
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}
1.2 idea下請先裝Eclipse Code Formatter的插件, 設置: File->Settings->Other Settings->Eclipse Code Formatter->Eclipse Java Formatter config file->導入文件
1.3 idea若是遇到裝不了插件的狀況, 設置: File->Settings->Appearance&Behavior->System Settings->Updates->將Use secure connection勾選去掉
模板地址
連接:https://pan.baidu.com/s/1rvhj0oW_SM8xnIyuOhQ_oQ
提取碼:f54k
file->Settings->Editor->General->Code Complention->Match case 勾去掉
file->Settings->Editor->File Types->ignore file and folders 結尾添加 .idea;*.iml
File -> Settings -> Editor -> General -> Code Folding -> Documentation comments 勾選。
右鍵->Folding->Expand All/Collapse All
alt+enter- >Add Javadoc
敲擊 Ctrl + Shift + Alt + / 而後雙擊Shift搜索進入Registry ,找到compiler.automake.allow.when.app.running ,而後勾選上。(運行期間自動編譯設置)。
https://www.jianshu.com/p/f658fed35786
File -> Settings -> Editor -> General ->Auto Import
1.add unambiguous imports on the fly //自動導入依賴
2.optimize imports on the fly(for current project) //優化導入和只能刪除勿關依賴
使用 Alt + Enter
進行導入包.
Insert imports on paste:複製代碼的時候,對於導入的包是否須要進行詢問的一個選項。
ASK(有須要導入的包名時會彈提示框,問你要不要導入)
NONE(有須要導入的包名時不會彈提示框,也不會自動導入)
ALL(有須要導入的包名時會自動導入,不會彈提示框)
Show import popup:當輸入的類的聲明沒被導入時,會彈出一個選擇的對話框
Optimize imports on fly:自動優化包導入,移除不須要的包
Add unambiguous imports on the fly:這個就是自動導入功能了,當你輸入類名後聲明就被自動導入了
Exclude from Import and Completion:這個其實就是你自定義import,能夠不用關注,通常來講你是用不上
idea會自動識別,本身也看下對不對嘛。
file->version control->git
path to git executable : git.exe 絕對路徑 c:\program files\git\cmd\git.exe
file->setting->appearance & behaivier -> show memory indicator
File-->Settings-->Editor-->General-->show quick documenttion on mouse move 勾選
有時候在看代碼的時候,不清楚一個類具體是幹什麼的,就會點進去看這個類的註釋,可是強大的IDEA是支持不用點進去就能夠看到註釋的以及類的相關信息的。可是須要手動打開
File-->Settings-->Editor-->General-->change font size(Zoom) with Ctrl+Mouse Wheel 勾選
File-->Settings-->Editor-->General-->Editor tabs
1.去掉 show tabls in one row
2.tab limits 增長爲20個。
在編輯區直接操做,能看到每一行代碼的最近一次修改人,以及提交記錄信息。這樣每行代碼都有記錄。能很快定位到誰動過代碼,而後找到指定的人來解決問題。
鼠標選中文件,而後右鍵,在彈出的列表中選擇Local History而後就能夠看到文件的本地修改記錄,即便沒有版本控制工具也能夠看到這些記錄。
File ->Other Settins -> Project Structure for New projects-> Project
File->Settings->Appearance & Behavior->System Settings->Updates下取消Automatically check updates for勾選
File->Settings->Editor->File Encodings
推薦設置:
Global Encoding:UTF-8
Projectt Encoding:UTF-8
Default encoding for properties files:UTF-8
勾選上Transparent native-to-ascii conversion
Transparent native-to-ascii conversion屬性主要用於轉換ascii,否則Properties文件的中文會被轉碼,IntelliJ IDEA除了支持對整個Project設置編碼以外,還支持對目錄、文件進行編碼設置。若是你要對目錄進行編碼設置的話,可能會出現須要Convert編碼的彈出操做選擇,強烈建議在轉換以前作好文件備份,否則可能出現轉換過程變成亂碼,沒法還原。對單獨文件的編碼修改還能夠點擊右下角的編碼設置區,若是代碼內容中包含中文,則會彈出演示中的操做選擇,Reload 表示使用新編碼從新加載,新編碼不會保存到文件中,從新打開此文件,舊編碼是什麼依舊仍是什麼,Convert 表示使用新編碼進行轉換,新編碼會保存到文件中,從新打開此文件,新編碼是什麼則是什麼。
File->Settings->Editor->General-->Code Comepletion -> insert selected suggestion by pressing space,dot,or other context-dependent keys 勾選上。
Setting-->editor-->inspections-->unused declaration-->methods 去掉
用着更新着吧