I was looking for a way to fold my JavaScript code in Atom using something like C# regions:
#region: hey
//some cool code here
#endregion
I couldn't find any package like this. I know that you can press CTRL + Alt + F and fold whatever code is selected. But I want to have named regions.
So the real question is, does anybody know how can I do this in Atom?
Thanks!
I was looking for the same and I found the package custom-folds.
By default, it will fold the code between // <editor-fold>
and // </editor-fold>
but you can customize it to work as // region
and // endregion
(notice the space between //
and region
. The package is in active development so it will soon support #region
. See the bug https://github.com/bsegraves/custom-folds/issues/3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With