Kate variables is kateparts implementation of document variables, similar
to emacs and vi modelines. In katepart, the lines have the format
kate: VARIABLENAME VALUE; [ VARIABLENAME VALUE; ... ]
the lines can of course be in a comment, if the file is in a format with comments.
Variable names are single words (no whitespace), and anything up to the next
semicolon is the value. The semicolon is required.
Here is an example variable line, forcing indentation settings for a C++, java or javascript file:
// kate: space-indent on; indent-width 4; mixedindent off; indent-mode cstyle;
Only the first and last 10 lines are searched for variable lines.
There are variables to support almost all configurations in katepart, and aditionally plugins can use variables, in which case it should be documented in the plugin's documentation.
When reading configuration, katepart looks in the following places (in that order):
The global configuration.
Optional session data.
The "Filetype" configuration.
Document variables in the document itself.
Settings made during editing from menu or command line.
Any variable not listed below is stored in the document and can be queried by other objects such as plugins, which can use them for their own purpose. For example the variable indent mode uses document variables for its configuration.
The variables listed here documents Kate version 2.4. More variables may be added in the future. There are 3 possible types of values for variables, with the following valid expressions:
BOOL - on|off|true|false|1|0
INTEGER - any integer number
STRING - anything else
Available Variables
auto-brackets [BOOL]
Set auto insertion of brackets on or off.
auto-center-lines [INT]
Set the number of autocenter lines.
auto-insert-doxygen [BOOL]
Turn insertion of the leading asterisk in doxygen comments on or off. This has no effect unless you use the cstyle auto-indenter.
background-color [STRING]
Set the document background color. The value must be something that can be evaluated to a valid color, for example "#ff0000".
backspace-indents [BOOL]
Turn backspace indenting on or off.
block-selection [BOOL]
Turn block selection on or off.
bracket-highlight-color [STRING]
Set the color for the bracket highlight. The value must be something that can be evaluated to a valid color, for example "#ff0000"
current-line-color [STRING]
Set the color for the current line. The value must be something that can be evaluated to a valid color, for example "#ff0000".
dynamic-word-wrap [BOOL]
Turns dynamic word wrap on or off.
eol | end-of-line [STRING]
Set the end of line mode. Valid settings are “unix”, “mac” and “dos”
encoding [STRING]
Set the document encoding. The value must be a valid encoding name, like “utf-8”.
font-size [INT]
Set the point size of the document font.
font [STRING]
Set the font of the document. The value should be a valid font name, for example “courier”.
icon-bar-color [STRING]
Set the icon bar color. The value must be something that can
be evaluated to a valid color, for example #ff0000
.
icon-border [BOOL]
Set the display of the icon border on or off.
folding-markers [BOOL]
Set the display of folding markers on or off.
indent-mode [STRING]
Set the auto-indentation mode. The options “none”, “normal”, “cstyle”, “csands”, “python”, “xml” are recognized. See the section the section called “Using automatic indentation” for details.
indent-width [INT]
Set the indentation width.
keep-extra-spaces [BOOL]
Set wheather to keep extra spaces when calculating indentation width.
keep-indent-profile [BOOL]
If enabled, prevents unindenting a block if at least one line has no indentation.
line-numbers [BOOL]
Set the display of line numbers on or off.
mixed-indent [BOOL]
Set mixed indentation ala Emacs on or off.
overwrite-mode [BOOL]
Set overwrite mode on or off.
persistent-selection [BOOL]
Set persistent selection on or off.
remove-trailing-space [BOOL]
Set dynamic end of line cleanup on or off.
replace-tabs-save [BOOL]
Set tab->space conversion on save on or off.
replace-tabs [BOOL]
Set dynamic tab->space conversion on or off.
replace-trailing-space-save [BOOL]
Set end of line cleanup on save on or off.
scheme [STRING]
Set the color scheme. The string must be the name of a color scheme that exists in your configuration to have any effect.
selection-color [STRING]
Set the selection color. The value must be something that can be evaluated to a valid color, for example "#ff0000".
show-tabs [BOOL]
Set the visual TAB character on or off.
smart-home [BOOL]
Set smart home navigation on or off.
space-indent [BOOL]
Set indentation with spaces on or off.
tab-indents [BOOL]
Set the TAB key indentation on or off.
tab-width [INT]
Set the tab display width.
undo-steps [INT]
Set the number of undo steps to remember.
word-wrap-column [INT]
Set the hard word wrap width.
word-wrap-marker-color [STRING]
Set the word wrap marker color. The value must be something that can be evaluated to a valid color, for example "#ff0000".
word-wrap [BOOL]
Set hard word wrapping on or off.
wrap-cursor [BOOL]
Set cursor wrapping on or off.
Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team