Sha*_*ong 5 c++ ide jetbrains-ide clion
在CLion中有一些奇怪的自动缩进,我不明白为什么.这是一个例子
int i1(5); // some comments, then I hit Enter
// auto indentation goes here. I hit Enter again
// It goes here
float f = 5; // some comments, then I hit Enter
// then auto indentation goes here. I hit Enter again
// It then goes here.
float f2 = 6;
// If I don't comment on the previous line, there is no weird indentation
Run Code Online (Sandbox Code Playgroud)
似乎每当我使用=来初始化变量,然后在行的末尾添加注释时,它会在下一行给我额外的缩进.但在所有其他情况下,它不会给我额外的缩进.
我最近安装了CLion,它使用的是默认代码样式.看起来额外的缩进是由continuation indent设置控制的,但我只希望这个continuation缩进设置应用于代码,而不是注释.在使用=进行赋值时,我可以在哪里更改设置以禁用注释的继续缩进?
此错误已在 CLion 2018.2 EAP ( https://www.jetbrains.com/clion/nextversion/ ) 中修复。
由于这个错误,我个人卸载了 CLion 2018.1,因为 EAP 足够稳定。