2024年6月7日发(作者:)

ideal 格式化代码

方法1:原生方法

使用Ctrl+Alt+L快捷键格式化代码,这时代码格式会变得很工整。

方法2:利用插件

一、idea格式化模板配置步骤

1、安装插件:EclipseCodeFormatter

阿里配置文件只是针对eclipse,所以导入配置文件之前需要先安装EclipseFormatter插件

打开idea编辑器:

File->Settings->Plugins

,搜索

eclipse code formatter

2、导入配置文件

上面步骤操作完页面不要关,找到下面的

Other Settings->Adapter eclipse code formatter

路径,按照图片位置找到

文件保存的位置,添加进去就行了(

文件放文章后面

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

value="do not insert"/>

insert"/>

value="do not insert"/>

value="do not insert"/>