idea常用操作

1.相关设置

1.1 自动注释斜杠在行首,如下:

1

但是我们需要设置在代码前面如下:

1
//System.out.println("Hello World");

所以设置如下:

进入 Settings -> Code Style -> Java ,在右边选择 “Code Generation” Tab,然后找到 Comment Code 那块,把
Line comment at first column
Block comment at first column
去掉前面两个的复选框