Using automatic indenting

KateParts editor component supports a variety of autoindenting modes, designed for different text formats. You can pick from the available modes using the ToolsIndentation menu. The autoindent modules also provide a function ToolsFormat Indentation which will recalculate the indentation of the selected or current line. Thus, you may reindent your entire document by selecting all the text and activating that action.

All the indent modes use the indentation related settings in the active document.


You can set all sorts of configuration variables, including those related to indentation using Document Variables and File types.

Available Autoindent Modes


Selecting this mode turns automatic indenting off entirely.


This indenter simply keeps the indentation similar to the previous line with any content other than whitespace. You can combine this with using the indent and unindent actions for indenting to your own taste.

C Style

An indenter for C and similar languages, such as C++, C#, Java™, JavaScript and so on. This indenter will not work with scripting languages such as Perl or PHP.


An indenter for the functional programming language Haskell.


An indenter for the Lilypond notation language for music.


An indenter specifically for the Lisp scripting language and Lisp dialects.


An indenter specifically for the python scripting language.

XML Style

An indenter specifically for XML like languages.