Code folding, especially zero-indented code...

Scripting and setups with Visual Studio Code (vscode) and AutoHotkey.
DaveT1
Posts: 224
Joined: 07 Oct 2014, 11:23

Code folding, especially zero-indented code...

Post by DaveT1 » 19 Nov 2021, 06:02

Re: viewtopic.php?f=89&t=77464&sid=f34d162c992757d434c916745c6e9c52&start=40#p393582

I came back to this after a long time away and couldn't get zero-indented code (braces in my case!) to work! But I found this VSCode marketplace extension: https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder&ssr=false#qna. I installed this and voila, I now have zero-indented code folding.

BUT, this extension seems to disable vscode's default indentation-based folding. So you need to use the code folding tags you defined for this extension for all folding requirements at any indent level. Had hoped that this would not be the case. And I'm not expert enough to figure out what's going on!

Also I edited the folding tags to be shorter and somewhat more meaningful (to me at least) = sfold and efold. Example below:
image.png
image.png (9.19 KiB) Viewed 2349 times
HTHs.

Return to “Visual Studio Code”