FAQ

Here are FAQs for Kate, KWrite and KatePart.

If you have questions that are not answered in the documentation or here, or you think the answers are not sufficient, please contact us so.

How can I install Kate/KWrite?

Kate, KWrite and KatePart are bundled with the normal KDE releases. If you wish to install any of it, please just install the corresponding KDE packages. KatePart is contained in the kdelibs package, Kate and KWrite in kdebase. If you use a distribution which splits these packages, like Gentoo, Debian or Ubuntu, you can just install the “kate” or “kwrite” packages to get these applications and all required libraries.

How to report a bug or a wish?

The right place to report bugs and wishes is in KDE’s bugtracking system. The easiest way to go is to click Help > Report Bug… in Kate or KWrite and then Launch bug report wizard.

Can I use different indenters for different files?


Yes, there are two solutions, either

Is it possible to open all files in the same Kate window?

Yes, just go to: kcontrol -> KDE Components -> File Associations -> text -> file type (e.g. plain)

Now choose kate in the right list, hit “Edit…” and go to the programs tab, change the command to this:

kate -u %U

That should do the trick.

How do I get an account at kate-editor.org

By emailing the webmaster (anders@kate-editor.org) and requesting one, including a motivation for why you need it. Knowing you from our mailing list or IRC will help.

You need an account if you want to either contribute content (articles) or translate the site to another language.

This procedure might change in the future.

Does Kate/KWrite run on windows?

Kate and KWrite will run on any platforms where KDE runs. This currently (KDE 3.5.1) does not include windows directly, but KDE can supposedly run under CygWin.

Work is being done to make KDE 4.0 run on windows when released.

What happened to the project support?

It was removed from Kate 2.5 (shipping with KDE 3.5) because it was working so poorly for the most users and caused some confusion. Instead Kate 2.5 and up supports named sessions.

You can read more about named sessions here

Since a while, a very good replacement for people loving the old project support is available in form of the “Kate Project Manager Plugin”. It can be found here on www.kde-apps.org.

How does Find in Files work?

The Find in Files tool is a front end for grep.

So if you get:

  • an error like syntax error in pattern: make sure your regular expression is valid, or disable the checkbox Regular expression
  • errors from the grep application: update grep to a newer version

How can I find/replace newlines?

In the principle you can’t. Kate sees the document as a list of lines, and so far search and replace is done in one line at the time.

You can find line beginnings using a regular expression “^” or “$”.

Using Kate, you can use the textfilter plugin with perl or sed to achieve this. A sample textfilter script which replaces more blank lines with one single newline could look like this (split into more lines for readability):

perl -e ‘while (<>) { if (/^\s*$/) { $blank++; } else { if ($blank) { print “\n”; undef $blank; } print; } }’

If you do this often, you could save the perl code to a script somewhere in your PATH. And you could write a script taking parameters to be able to specify search and replace patterns.

If you use KWrite or other KatePart clients, you could easily write a javascript that works just like the above example, see the javascript documentation

How can I get KatePart to autoindent XXX code?

For Kate 3.0 (KDE 4.0) an up, indentation is scripted, that is you can write a javascript that can indent your files. Read Dominiks blog about indentation scripts.

Up to KAte 2.5.x the autoindenters except for Normal which simply indents equally to the first above line that is not blank are all depending on the highlight data, and therefore are not very flexible — for example the C Style indenter can not be used with perl or php code.

A better indentation framework is in the works for KatePart in KDE 4, for now you have these options:

  • You can get decent results with the Variable based indenter in many text formats from bash to perl to CSS, see this article.
  • You can write a indenter yourself, read this article.
  • You can help us writing a better indentation system for the next version of KatePart.