好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Intellij IDEA 2020.3 配置教程详解

设置项

这个版本已经取消了defalut settings指定成默认 配置 的选项,所以配置都是在settings中配置

设置项

 

设置统一utf-8编码

路径: file -> settings --> editor --> file encodings 勾选transparent native-to-ascii conversion : 解决比如properties 文件中的unicode乱码

设置默认jdk

路径: file-> project structure 设置平台的 sdks --> apply 即可;

下次导入的工程

都默认用这个jdk

设置eclipse 代码格式化xml 文件

老的统一格式化代码配置,都还用的eclipse的配置文件,这个设置可以做个兼容

首先要下载插件: eclipse code formatter 路径: file -> settings --> other settings–> eclipse code formatter

设置统一的java类文件头注释

路径: file -> settings --> editor --> file and code templates includes 标签页 --> file header

工程包路径展示 , flatten package

这个看个人习惯:看习惯了eclipse的包路径结构:刚看idea会不习惯。

快捷键设置成eclipse快捷键

这个功能看人习惯,不建议设置,习惯idea快捷键就好。 路径: file -> settings --> keymap

修改alt + / 的代码提示快捷键

找到code -> basic 项修改其快捷键

降级idea的代码检查设置

idea的特点,各种代码检查,甚至注释都有很好的检查,方便开发编码时发现错误。这个里面设置项非常多,可以按需设置检查提示 降级public方法或者public变量,工程中未使用的错误提示;

如下图

路径: file -> settings–> editor -> inspections 设置方法: 找到 java项 -> declaration redundancy -> unused declaration 将filed 和method 的级别调到 private

配置maven

路径: file -> build,execution,deployment -> build tools --> maven 指定maven home 和setting.xml 路径 注意点 :设置的settings.xml必须在maven安装目录的conf下面。

因为在执行mvn命令时只会在conf下找settings

maven编译启动控制台中文乱码设置

问题现象如下图

设置路径: file -> build,execution,deployment -> build tools --> maven --> runner vmoptions: -dfile.encoding=gb2312

设置完结果展示

设置git

 前提是本地必须安装好git的客户端 配置路径: file -> version control --> git 指定git.exe的应用程序  

设置svn

 前提是本地必须安装好svn的客户端 设置路径: file -> version control --> subversion 指定svn.exe的应用程序

设置自动编译

idea 不像eclipse,保存文件,会自动编译;可以进行下面设置 设置路径: file -> settings ->build,execution,deployment -> compiler 勾上build project automatically选项

编辑器设置批量import包

可不设置,按需 路径: file -> settings --> editor --> general --> auto import

设置run程序不检查全部类的错误

idea 在项目启动时,会检查整个工程是否有编译错误,如果有,不管是否影响当前类的运行,都会运行失败。比如:mainclass为要运行的正常类,目录下存在一个类errorclass有错误,运行mainclass时会无法运行。 现在需要忽略errorclass中的错误,执行mainclass中的代码。

说明:新的版本做过多种设置尝试,没有能实现的了。只能单独建个工程做main测试(坑啊)

设置工作区多标签

路径: file -> settings ->build,execution,deployment -> compiler

设置idea上网代理

路径: file -> settings ->appearance & behavior -> system settings -> http proxy

到此这篇关于intellij idea 2020.3 配置教程详解的文章就介绍到这了,更多相关idea 2020.3 配置内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!

查看更多关于Intellij IDEA 2020.3 配置教程详解的详细内容...

  阅读:17次