Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
166 views
in Technique[技术] by (71.8m points)

Intellij comment format

Now, I am using the default configurations, and the "//" is displayed at the first column when I press the "command" + "/", see the second line in the picture.

How can I change configuration to display the "//" at the start of the code and following with a space? Just like the first line.

enter image description here

question from:https://stackoverflow.com/questions/18821275/intellij-comment-format

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is an option in: Code Style > Java > Code Generation > Comment Code

intellij cfg

With "Line comment at first column" you can switch between:

    //System.out.println("");
//  System.out.println("");

So, you don't have a 'space' after comment (in first line), but its close enough :)

Idea 2017.2+

Recent versions of IntelliJ IDEA support adding a space after the line comment. The setting is at the same location.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...