Just as .vimrc and .bashrc and .gimprc, is there a .katerc?

If so, how do you use it?

1 Answer 1


There's no .katerc file like .vimrc or .bashrc, but there's a .kateconfig. From the Kate docs:

KatePart variables is katepart's implementation of document variables, similar to Emacs and vi modelines. In katepart, the lines have the following 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: replace-tabs on; indent-width 4; indent-mode cstyle;

Note: Only the first and last 10 lines are searched for variable lines.

Additionally, document variables can be placed in a file called .kateconfig in any directory, and the configured settings will be applied as if the modelines were entered on every file in the directory and its subdirectories, as far down as the configured search depth. Document variables in .kateconfig use the same syntax as in modelines.

There are variables to support almost all configurations in katepart, and additionally plugins can use variables, in which case it should be documented in the plugin's documentation.

It's not clear how Kate stores global configuration, but since the documentation doesn't mention it, I'd say it's not supposed to be edited outside of Kate.

  • sorry to necro, but that is not true. There IS a .katerc within ~/.config, along with some other kate-related rc files. The problem would be to know how to modify them, as they seem to be undocumented. Also for some reason they keep recent files and simmilar stuff within, so they have to change it everytime you closed a new file. In the .katepartrc for example, one can change settings concerning e.g. the swap directory. But I agree it's not really meant for that
    – Teck-freak
    Jul 28, 2019 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.