最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

atom editor - Region code folding for javascript - Stack Overflow

programmeradmin2浏览0评论

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 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!

Share edited Mar 25, 2016 at 22:47 NaN asked Mar 25, 2016 at 22:36 NaNNaN 4853 silver badges12 bronze badges 3
  • 3 if your question generally covers… software tools monly used by programmers …then you’re in the right place to ask your question! - What topics can I ask about here? – NaN Commented Mar 25, 2016 at 22:43
  • that was a big burn lol – Joe Tannoury Commented Mar 25, 2016 at 22:49
  • 2 custom-folds – Jonathan Lonowski Commented Mar 25, 2016 at 23:05
Add a ment  | 

1 Answer 1

Reset to default 7

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./bsegraves/custom-folds/issues/3

发布评论

评论列表(0)

  1. 暂无评论