Make Synergy statements collapsible
Making certain traditional Synergy statements collapsible (ala C#) in the IDE would be tremendously helpful in maintaining code:
BEGIN-END
USING-ENDUSING and CASE-ENDCASE
RECORD-ENDRECORD and COMMON-ENDCOMMON (including implied ENDRECORD/ENDCOMMON)
are good places to start. Eventually, it would be nice to also collapse loops (FOR, DO, WHILE, etc.) and any other related section of code.
Paragraphs/internal subroutines may be a bit more challenging as there can be multiple entry points and RETURNs which could be difficult to determine what is the entirety of the paragraph, but collapsing paragraphs would also be nice.
We call this bit of functionality Outlining.
I think expanding it to support all the different syntax blocks is a great idea. You've got my vote!
I'm not sure how we would be able to detect your blocks for internal subroutines, but you could always use .region/.endregion to wrap your internal routines and get neatly collapsible regions. If we implement begin/end, you could ensure that you use begin/end blocks to get more or less the same behavior.
4/10/2019 4:04 PM 0
Which is a similar ask from back in 2016
4/11/2019 10:22 PM 0
eg,
calc,
begin
a += 1
b += 1
c = a + b
return
end
4/12/2019 8:28 AM 0
9/17/2020 3:42 PM 0
12/1/2020 7:46 PM 0
If this allows collapsing and expanding nested BEGIN/END blocks it will be very useful.
eg
repeat
begin
if (test) then
begin
if (anothertest) then
begin
brilliant lines of code
end
else
begin
slightly less impressive lines of code
end
end
else
begin
more code
end
end
maybe anothe end I mightn't really need ?
12/1/2020 7:50 PM 0
Indeed it will.
In fact in that scenario you will have aa choice whether to collapse the REPEAT statement:
Or the BEGIN/END block:
Or, both!
12/1/2020 8:17 PM 0