foldlevel
Foldlevel is a numeric setting used by text editors and integrated development environments to control how code folds are displayed. Code folding allows blocks of text to be collapsed into a single line or summary, helping users manage large files by focusing on structure rather than details. Foldlevel determines how deep nested fold regions should be expanded when a file is opened or the editor refreshes its view; folds deeper than the specified level are collapsed. While the core idea is consistent, the precise interpretation and default values can vary between editors and folding methods.
In editors that support explicit folding methods—such as Vim with foldmethod (manual, syntax, indent, marker, etc.)—foldlevel
The concept is generally display-oriented: foldlevel does not alter the underlying text, only its presentation. Changes