Case code offset for javascript

I was looking for a way to collapse JavaScript code in Atom using something like C # areas:

#region: hey //some cool code here #endregion 

I could not find such a package. I know that you can press CTRL + Alt + F and reset any code. But I want to name the area.

So the real question is: Does anyone know how I can do this in Atom?

Thanks!

+5
source share
1 answer

I searched the same and I found the custom-folds package .

By default, it resets the code between // <editor-fold> and // </editor-fold> , but you can configure it as // region and // endregion (note the space between // and region . In active development so it will support #region soon. See bug https://github.com/bsegraves/custom-folds/issues/3

+6
source

Source: https://habr.com/ru/post/1245798/


All Articles