I have taken the leap from my comfortable dreamweaver IDE to Netbeans and am missing my code folding options :(
I see with Netbeans you can fold nor
//<editor-fold defaultstate="collapsed" desc="Your Description">
.... pieces of code ....
//</editor-fold>
credits goes to my teacher in college
Edited*
NetBeans 7.3 Beta 2 has improved code-folding for javascript. You can add custom fold comments to block off whatever you want:
// <editor-fold>
... code ...
// </editor-fold>
More information here.
After a week of use the beta version of NetBeans mysteriously slowed down. I reinstalled it, which is a bit of a chore, but no problems since then. The code folding is very helpful.
The short answer is that there is no way to fold code by matched parens with out using their hideous NB specific XML tags (which means anyone else looking at your code in any other IDE is going to get extremely confused).
This needs to be fixed but Oracle doesn't seem to care.
The shortcut key for folding all of the data in any file type is "Ctrl
+ Shift
+ -
(minus sign)".
To expand fully that file, you need to do the opposite, which is "Ctrl
+ Shift
+ +
(plus sign)".
To see & edit the whole Keyboard Shortcuts of NetBeans IDE, please go to the "Tools
Menu > Options
> Keymap
Tab".
Hope it helps.
Update for Folding Code Structures other than the Functions itself:-
Follow these steps:-
Tools
Menu > Options
> Editor
Tab > General
Sub-Tab".if
" & "for
" logic, ...), and then restart the application (otherwise it MAY NOT work).