Text folding is an intrinsic capability of the Scintilla edit control, which has spawned the ScintillaEditorFamily of text editors.