Introduction

You recognize his code by seeing many {{{ and }}} strings all over the sources. These strings are used to define custom folds in vim. They're just everywhere, it makes the code much less readable in other editors. Well, isn't this a typical example of user lock-in? ;-) If you're not using vim, sorry, your eyes have to skip all those {{{s.

Details

Anyway, obviously folding seems to be an important issue for some of the people. Today's NetBeans tip is for all folding deviants. Did you know that next to usual NetBeans folds you can define custom folds? Maybe you've mentioned it in J2EE classes or in Swing forms, but in case you didn't here's a short explanation.

To add your custom fold, use following piece of text:

 // <editor-fold>
   Your code goes here...
// </editor-fold>

You can define default description of a collapsed fold like this:

 // <editor-fold desc="This is my super secret genius code.">
   Your code goes here...
// </editor-fold>

You can set a fold to be collapsed by default this way:

 // <editor-fold defaultstate="collapsed">
   Your code goes here...
// </editor-fold>