Code folding

from Wikipedia, the free encyclopedia

Code folding and code folding denotes a function in editors, especially in modern integrated development environments to logically related sections of code such as classes or methods in so-called Folds and wrinkles to group. You can then simply fade in and fade out the sections as if folding a sheet of paper to fade out certain lines.

GFA-BASIC was one of the first programming languages ​​that supported this function and made it known .

The code convolution has nothing to do with the similar sounding convolution codes .

Custom editor folds

Some editors also allow you to define custom folds. Here are some examples:

  int function () //{{{
  {
    ''Programmcode''
  }
  //}}}

When folded, this section looks like this:

 +--  5 Zeilen: int function () //---------------------------

Instead of {{{and}}} other markings can be used.

// <editor-fold defaultstate="collapsed" desc="Beschreibung">
  Quelltext
// </editor-fold>
#region Beschreibung
  Quelltext
#endregion
#Region Beschreibung
  Quelltext
#End Region