idea sets single-line comment format (including configuration files)

1. IDEA single-line comments are in the first position by default;

insert image description here
Modification method: Enter File–>Settings–>Editor–>Code Style–>Java, modify Code Generation,
insert image description here
remove the checkmark in front of Line comment at first column, select Add a space at comment start, and select the second one to make // Add a space between the note and the comment, and then click Apply

2. Configuration file comments:

File–>Settings–>Editor–>Code Style–>XML, remove the checkmark before Line comment at first column
insert image description here

Guess you like

Origin blog.csdn.net/weixin_41544662/article/details/117594855#comments_23753552