Q:

Code folding in Netbeans for javascript

I just recently started using Netbeans, and i have been working with javascript files, the files are becoming large, and i want the ability to group function in something like this in visual studio, actually code folding.

#region
  code goes here
#endregion 

After a search i found out that you could use

//<editor-fold>
  </editor-fold>

http://wiki.netbeans.org/FaqCustomCodeFolds
but this does not work with .js files, as it's treated like a comment.
Please advise, how to add custom code folding in Netbean on javascript files.

A:

Currently the custom code folding is not supported on javascript files to the current editor.
But will soon be implemented in the new editor in the official distribution of netbeans,
That allows you to edit your javascript files, with all features currently available in other programming languages.
New JavaScript Editor
But if you can not wait more, then you can download the Develoment Version of NetBeans
Implementing the new editor, without losing your current project settings.
Also you will can create your template code, for make a surround block code.  Explained in this link.
And this is the new editor in test

