Using Code Folding
Prev
Next

Using Code Folding

Code folding allows you to hide parts of a document in the editor, making it easier to overview large documents. In Kate the foldable regions are calculated using rules defined in the syntax highlight definitions, and therefore it is only available in some formats - typically program source code, XML markup and similar. Most highlight definitions supporting code folding also lets you manually define foldable regions, typically using the BEGIN and END keywords.

To use the code folding feature, activate the folding markers using View->Show Folding Markers menu item if they are not already visible. The Folding Markers Pane in the left side of the screen displays a graphical view of the foldable regions, with +/- signs to indicate the possible operation on a given region: a - means that the region is expanded, clicking the - will collapse the region and a + will be displayed instead.

Four commands are provided to manipulate the state of folding regions, see the menu documentation.

If you do not want to use the code folding feature, you can disable the Show folding markers (if available) option in the Appearance page of the editor configuration

Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team