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

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前的对勾

 

posted @ 2019-12-27 11:00  两碗白米饭  阅读(4006)  评论(2编辑  收藏  举报