idea设置单行注释格式(包括配置文件)

1、IDEA单行注释默认是在首位置;

在这里插入图片描述
修改方法:进入File–>Settings–>Editor–>Code Style–>Java,修改Code Generation
在这里插入图片描述
去掉Line comment at first column前的对勾,选中Add a space at comment start,选中第二个是为了让//和注释中间加一个空格,然后点击Apply即可

2、配置文件注释:

File–>Settings–>Editor–>Code Style–>XML,去掉Line comment at first column前的对勾
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_41544662/article/details/117594855#comments_23753552