Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code folding
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Tool of editors for programming, scripting and markup}} {{confuse|Constant folding}} [[File:Vim-folding.png|thumb|upright=1.35|Code folding example on [[PHP]] code with [[vim (text editor)|Vim]]]] '''Code''' or '''text folding''', or less commonly '''holophrasting''',<ref>Simon Gauvin, Omid Banyasad, "Transparency, holophrasting, and automatic layout applied to control structures for visual dataflow programming languages", in ''Proceedings of the 2006 ACM symposium on Software visualization'', p. 67β75</ref> is a feature of some [[graphical user interfaces]] that allows the user to selectively hide ("fold") or display ("unfold") parts of a document. This allows the user to manage large amounts of text while viewing only those subsections that are currently of interest. It is typically used with documents which have a natural [[tree structure]] consisting of nested elements. Other names for these features include '''expand and collapse''', '''code hiding''', and '''outlining'''. In [[Microsoft Word]], the feature is called "collapsible outlining". Many user interfaces provide [[disclosure widget]]s for code folding in a sidebar, indicated for example by a triangle that points sideways (if collapsed) or down (if expanded), or by a <code>[-]</code> box for collapsible (expanded) text, and a <code>[+]</code> box for expandable (collapsed) text. '''Code folding''' is found in [[text editor]]s, [[source code editor]]s, and [[integrated development environment|IDE]]s. The folding structure typically follows the [[Abstract syntax tree|syntax tree]] of the program defined by the [[computer language]]. It may also be defined by levels of [[Indentation style|indentation]], or be specified explicitly using an in-band marker (saved as part of the source code) or out-of-band. '''Text folding''' is a similar feature used on ordinary text, where the nested elements consist of paragraphs, sections, or [[Outline (list)|outline levels]]. Programs offering this include [[folding editor]]s, [[outliner]]s, and some [[word processor]]s. '''Data folding''' is found in some [[hex editor]]s and is used to structure a binary file or hide inaccessible data sections.<ref>{{cite web |title=HxD - Freeware Hex Editor and Disk Editor |website=mh-nexus |url=http://mh-nexus.de/hxd/ |accessdate=2007-04-30}}</ref> Folding is also frequently used in [[data comparison]], to select one version or another, or only the differences.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)