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

JAVA学习网 2019-12-28 00:31:06

idea中文件单行注释默认在行首位置

 

 

 修改方法:进入File-->Settings-->Editor-->Code Style-->Java,修改Code Generation

 

 

 

 去掉Line comment at first column前的对勾,选中Add a space at comment start,选中第二个是为了让//和注释中间加一个空格,然后点击Apply即可

 

 

配置文件注释:File-->Settings-->Editor-->Code Style-->XML,去掉Line comment at first column前的对勾

 

阅读(2554) 评论(0)