I'm running Standard Debian Wheezy with KDE 4.8.4 and Kate 3.8.4.

The Kate text editor's syntax highlighting files are located in:


If I run

kde4-config --prefix

this gives


and $KDEDIR is empty. This results in that only XML files in the upper direcory are used for highlighting.

In several other forums, I saw that it should work to create a folder "syntax" in


If I put syntax-highlighting files there on my system, they appear to be ignored.

How can someone change/set the directory for the syntax-highlighting files used by Kate to an arbitrary directory?


I found a solution just by chance:

Settings -> Kate config -> Open/Save -> File types

If I click on "Download syntax-highlighting files", all files which are already installed and can be updated (a newer version is available) are marked here. Then a click on "Install" updates alle these files. After that the folder


exists and includes all installed XML files. Now I can add additional files to that folder or can modify the existing files therein. The modifications will be applied after restarting Kate.

This solves my problem for the moment. But I don't understand why it works in this way! (Maybe someone can comment on that)

The other open task is how one can choose a different folder for the XML files.

|improve this answer|||||
  • 5
    As of katepart5, the standard directory is now ~/.local/share/katepart5/syntax – Datalore Feb 2 '15 at 0:37
  • The directory is now ~/.local/share/org.kde.syntax-highlighting/syntax – Adrian Willenbücher Dec 3 '18 at 7:52

For the latest version of Kate, placing syntax xml files in this directory works:


Thanks @Datalore

|improve this answer|||||

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.