Folding comments in VSCode

I moved over from Atom belatedly but find that the shortcuts for folding all or folding block comments are not working with Julia block comments. Atom also used to fold a series of single line comments, which I found helpful.

Is there a way to implement both of these in VScode?

2 Likes

Not exactly what you’re asking, but I found out recently, that you can put the following comments around an (almost) arbitrary part of code to make it a foldable region in VSCode:

#region >>ARBITRARY TEXT<<
...
code
...
#endregion

Almost arbitrary, because the defined region must not intersect another already foldable block (which of course makes sense).

2 Likes