每隔一段时间,我都会编辑一些长的 if-then-else 语句(或者更糟糕的是,嵌套的 if-then-else 语句),例如:
if A < B then
begin
DoSomething;
DoSomethingElse;
{...and more statements going on and on and on...}
FinallyWrapUpThisBit;
end
else
begin
DoThis;
DoThat;
{...and more statements going on and on and on...}
FinallyWrapUpThisBit;
end;
...而且我发现自己想要“折叠”第一个开始-结束对,以调出较低的“else”部分(通常是因为我指的是 if-then 语句之上的内容。也许它会这么说“开始...”并在其左侧添加 [+} 符号以再次展开。
我已经探索了 IDE 中的“折叠”功能,但似乎没有一个命令可以做到这一点。似乎我的旧 D6 的 CodeRush 做到了这一点,但我可以想象事情。(我的想象力很活跃……)。
像 Castalia(或其他一些)这样的任何 IDE 插件都可以做到这一点吗?