Kates editor component supports a variation of autoindenting modes, designed for different text formats. You can pick from the available modes using the -> menu. The autoindent modules also provides a function -> 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 indenters uses the indentation settings in the active document: wether to indent with TABs or whitespace, indent-width and wether to do mixed indenation.
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.
A 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 alternative indenter for C and similar languages, with the same constraints.
A indenter specifically for the python scripting language.
A very nice XML auto-indenter. However tempting, do not try to use this with HTML other than XHTML, because it fails with the old style HTML tags (open tags like for example <br>)
The variable indenter is experimental, and may change behavior or disappear in future versions.
The variable indenter is special in that it can be configured using variables in the document (or in a filetype configuration). The followwing variables are read:
A regular expression which will cause a line to be indented by one unit, if the first non-whitespace-only line above matches. var-indent-indent: A regular expression, which will cause a matching line to be indented by one unit.
A regular expression which will cause the line to be unindented by one unit if matching.
A list of characters that should cause the indention to be recalculated immediately when typed.
A list of parenthese sets to handle. Any combination of 'parens' 'braces' and 'brackets'. Each set type is handled the following way: If there are unmatched opening instances on the above line, one indent unit is added, if there are unmatched closing instances on the current line, one indent unit is removed.
var-indent-couple-attribute
When looking for unmatched couple openings/closings, only characters with this attribute is considered. The value must be the attribute name from the syntax xml file, for example "Symbol". If it's not specified, attribute 0 is used (usually 'Normal Text').