IDEA 常用配置

tech2025-05-17  11

个人常用配置

文章目录

配置修改新创建的项目的配置字体大小和样式快捷键修改(ctrl + space)自动导包和导包优化避免自动导入import.*maven配置统一UTF-8编码修改背景为护眼色实现序列化的类需添加serialVersionUID警告开启开启自动编译将终端Terminal替换为Git Bash/Cmder窗口tab展示为多行 插件Alibaba Java Coding GuidelinesLombokMaven HelperRainbow Brackets

配置

修改新创建的项目的配置

路径: File > New Projects > Settings For New Projects…

字体大小和样式

路径: File > Settings > Editor > Font

快捷键修改(ctrl + space)

代码提示: ctrl + space, 与win10快捷键冲突, 修改为: alt + / 路径: File > Settings > Keymap

自动导包和导包优化

路径: File > Settings > Editor > General > Auto Import

Add unambiguous imports on the fly: 快速添加明确的导入Optimize imports on the fly: 快速优化导入, 优化的意思即自动帮助删除无用的导入

避免自动导入import.*

路径: File > Settings > Editor > Code Style > Java > Imports

maven配置

路径: File > Settings > Build, Execution, Deployment > Build Tools > Maven

统一UTF-8编码

路径: File > Settings > Editor > File Encodings

修改背景为护眼色

路径: File > Settings > Editor > Color Scheme > General

设置Background为C7EDCC

实现序列化的类需添加serialVersionUID警告开启

开启警告便于快捷添加serialVersionUID 路径: File > Settings > Editor > Inspections

开启自动编译

路径: File > Settings > Build,Execution,Deployment > Compiler 按快捷键Shift+Ctrl+Alt+/, 选择Registry 勾选上compiler.automake.allow.when.app.running, 点击Close关闭

将终端Terminal替换为Git Bash/Cmder

路径: File > Settings > Tools > Terminal

Cmder: "cmd.exe" /k ""C:\software\cmder\vendor\init.bat"" Gitbash: "C:\software\Git\bin\bash.exe" -login -i

窗口tab展示为多行

路径: File > Settings > Editor > General > Editor Tabs

取消勾选 Show tabs in one row

插件

Alibaba Java Coding Guidelines

阿里代码规约

Lombok

简化代码

Maven Helper

可查找和排除Jar包冲突的依赖关系

Rainbow Brackets

彩虹括号, 将同级的括号变为同一种颜色
最新回复(0)