对于下面的代码:
this.fooService
.bar$
.pipe(takeUntil(this.destroy$))
.subscribe(
(value: ValueType) => {
// do something
}
);
而不是像这样折叠它:
this.fooService
.bar$
.pipe(takeUntil(this.destroy$))
.subscribe(
(value: ValueType) => {...}
);
我希望 WebStorm 这样折叠它:
this.fooService ...
最佳答案
您可以使用 editor-fold
来实现,desc
将成为折叠显示。
this.fooService //<editor-fold desc="...">
.bar$
.pipe(takeUntil(this.destroy$))
.subscribe(
(value: ValueType) => {
// do something
}
);
//</editor-fold>
最终做了这样的事情:
this.fooService ...
希望对您有所帮助!
来源:Jetbrains blog .
关于javascript - 如何在 WebStorm 中折叠缩进函数链?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57188835/