Code folding in Netbeans PHP

I recently found out a tip that C#-style #region and #endregion-style declarations work in NetBeans for PHP too, although with a slightly different syntax.

The trick was making it work in HTML, since I use it mostly for defining different sections of my .phtml templates, which can get pretty long:

<? // <editor-fold defaultstate="collapsed" desc="JavaScript code"> ?>
...
<? // </editor-fold> ?>

Realized you had to escape to PHP for it to work. A little extra syntax, but look at my beautiful, beautiful HTML code:

One Comment

  1. Posted February 6, 2009 at 12:14 | Permalink

    I especially like the added colors :)

Post a Comment

Your email is never shared. Required fields are marked *

*
*