对 IDEA 进行设置,让开发的时候更加便利顺手

以下是我对 IDEA 的设置,可供参考

IDEA 版本 2020.3.2

主题设置

自带了四种主题

img

黑暗:

img

明亮:

img

Windows 10 明亮效果:

img

对比度,一般都没人用吧

img

字体大小设置

IDE font 是针对 IDE 工具的,Editor font 是代码窗口的也就是代码的字体大小

img

还有一种控制台字体设置

img

编码格式设置

File -> Settings -> Editor -> File Encodings

img

自动导包设置

File -> Settings -> Editor -> General -> Auto Import

img

Insert imports on paste

  • Always:有需要导入的包名时,会自动导入,不会弹提示框
  • ASK:有需要导入的包名时,会弹提示框,问你要不要导入
  • None:有需要导入的包名时,不会弹提示框,也不会自动导入。

Add unambiguous imports on the fly:这个就是自动导入功能了,当你输入类名后,声明就被自动导入了。

Optimize imports on fly:把不用的声明移除掉。

自动忽略大小写设置

File -> Settings -> Editor -> General -> Code Completion

img

关闭 IDEA 自动更新设置

File | Settings | Appearance & Behavior | System Settings | Updates

img

方法之间的分割线

File -> Settings -> Editor -> General -> Appearance

img

效果:

img

注释设置

使用 IDEA 快捷键注释默认是这样的

img

本人非常不喜欢,我喜欢在它旁边空一行的注释

File -> Settings -> Editor -> Code Style -> Java

img

效果:

image-20210301163702088

现在我看着就很舒服

HTMLXML 注释也是一样,把那俩勾勾去掉即可

img

代码自动编译

File -> Settings -> Build,Execution,Deployment -> Compiler

image-20210301163947602

设置 Lombok 编译

File | Settings | Build, Execution, Deployment | Compiler | Annotation Processors

勾上 Enable annotation processing

image-20210301164151544

Maven 设置

File | Settings | Build, Execution, Deployment | Build Tools | Maven

image-20210301165247469

IDEA 查看内存使用情况

image-20210301165614422

效果:

image-20210301165652352

IDEA 设置代理

File | Settings | Appearance & Behavior | System Settings | HTTP Proxy

proxy

然后点击 Check connection 输入 YouTube 的网址验证是否成功

youtube

success

还有另一种验证方式!就是使用 IDEA 的 HTTP Client

httpclient

images

以上就是我个人对 IDEA 2020.3.2 的所有设置了