Javascript 如何在WebStorm中折叠缩进的函数链?
对于以下代码:Javascript 如何在WebStorm中折叠缩进的函数链?,javascript,webstorm,Javascript,Webstorm,对于以下代码: this.fooService .bar$ .pipe(takeUntil(this.destroy$)) .subscribe( (value: ValueType) => { // do something } ); 而不是像这样折叠它: this.fooService .bar$ .pipe(takeUntil(this.destroy$)) .subscribe( (value: ValueType)
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 ...