相关疑难解决方法(0)

行注释斜杠的缩进

当我使用IntelliJ的功能"使用行注释注释"时,它会在所选行的最开头处放置两个斜杠.正斜杠不会与其余代码一起缩进.如何在放置正斜杠时使IntelliJ服从线条缩进?

示例代码:

if (something) {
    bar();
}
Run Code Online (Sandbox Code Playgroud)

在第2行使用IntelliJ的注释功能会导致:

if (something) {
//  bar();
}
Run Code Online (Sandbox Code Playgroud)

我想要的是:

if (something) {
    // bar();
}
Run Code Online (Sandbox Code Playgroud)

intellij-idea

52
推荐指数
2
解决办法
4568
查看次数

标签 统计

intellij-idea ×1