初学java,idea走一波先。安装完成,配置配置项.
官方下载地址:https://www.jetbrains.com/idea/download/#section=windows
我盘里面的,时间久啦就老啦。忽略。
版本
IntelliJ IDEA 2019.1.3 (Ultimate Edition)Build #IU-191.7479.19, built on May 28, 2019Licensed to jetbrains jsSubscription is active until November 27, 2019JRE: 1.8.0_202-release-1483-b58 amd64JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.oWindows 10 10.0
链接:https://pan.baidu.com/s/1Oy1Pr_XrMybEg8WmYtLjaA 提取码:7nvg
Path: C:\Program Files\Java\jdk1.8.0_162\binCLASSPATH: C:\Program Files\Java\jdk1.8.0_162\libJAVA_HOME C:\Program Files\Java\jdk1.8.0_162
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-8Projectt Encoding:UTF-8Default encoding for properties files:UTF-8勾选上Transparent native-to-ascii conversionTransparent 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 去掉
用着更新着吧
转载于:https://www.cnblogs.com/knowledgesea/p/11158412.html
