Category Archives: Users

KDE 4.5 is approaching, thanks to all Kate contributors

KDE 4.5 will be released in the next days with the most polished Kate/KWrite and KatePart during the KDE 4.x series.

A lot of work went into fixing bugs and cleaning up old code for this release. Many important aspects where redone, just to enumerate a few:

  • encoding detection & handling
  • the text buffer
  • the undo/redo system (thanks Bernhard)
  • search/replace (thanks again Bernhard)
  • handling cursors and ranges
  • improved spell checking (thanks Michel)
  • improved indentation (thanks Milian)
  • speed improvements (Milian too)
  • better JS scripting (Dominik)
  • porting of KDevelop to new interfaces (David Nolden)

It will be the most unit-tested release of KatePart ever I guess, but still a long way to go until we have a good test coverage. (we just scratch the surface)

Many thanks to the people contributing to this release (not only to the ones named above or below!), without that much helping hands, never such an amount of cool stuff would have happened ;)

I guess one of the real kickoffs was the great Kate/KDevelop sprint in Berlin, handled by Milian and sponsored by the e.V., thanks a lot!

For the next release, with KDE 4.6, already new cool stuff is in production:

If you think, you can help us, just join us and make Kate for KDE 4.6 even more awesome.

KateSQL, a new plugin for Kate


today i will show you a new plugin for Kate, called KateSQL.
As you may have guessed, it brings to Kate the basic features of an SQL client, allowing you to open connections, execute queries, and display result data from SELECT statements or stored procedures.
Since this plugin makes an extreme use of the Qt Sql module, most of database drivers are supported..

Said this, let me explain how it works..

Kate MainWindow with KateSQL widgets

First of all, you have to create a new db connection through a simple wizard, specifying driver, connection parameters (hostname, username, password, etc…), and a descriptive name, that KateSQL will use as identifier.
Done this, what you need to do is just select the query text in the editor and press F5 (or your preferred shortcut). The whole text will be executed through the selected connection.

For SQL output, two toolbox are disposed in the bottom area:

  • The first will show messages returned from the server (errors in red, others in green, like number of affected rows).
  • The second contains a table view with a custom model associated, to show resultsets of a query. This custom model does nothing more than a QSqlQueryModel, only provides colors and formatting for each cell..

Ah, about this, my last commit implements a configuration widget that let you choose colors and font styles for text fields, numbers, blobs, nulls, booleans and dates… cool, yeah? :)

KateSQL Configuration Dialog

Last but not least, on the left panel you can find a basic and useful schema browser, that show the tree schema of the database connection currently selected. With this tree widget you can browse through tables, system tables and views, up to individual fields. obviously, primary key fields are distinguished by the classic yellow key icon.

Currently, there are few problems with multiple query handling.. Some engines doesn’t supports it natively, others can receive queries separated by a semicolon, but the QSqlQueryModel can handle only one resultset at time.. probably the best solution is to parse the text, split queries, and execute them separately.. Surely, this feature will be implemented soon.
Stay tuned!

Of course, if you want to help us with development, you are welcome!

Kate XML Completion Plugin

A while ago I’ve blogged about the Kate’s most powerful plugins: the XML completion plugin. Thanks to Tomáš Trnka this plugin is back alive with all its features since today and compiled by default in trunk: It will be included in KDE 4.5. Yay! :) And if you need it already now for KDE 4.4, you can build Kate yourself very easily according to this howto, without touching your global KDE installation (probably interesting for KDE documentation writers!). Have fun!

Quick Compiling Kate in a stable KDE Environment

Since all of the Kate code is now co-hosted on gitorious, it became very easy to build Kate in your stable KDE >= 4.4 environment. This means you can run the newest version of Kate with very few effort. Just give it a try and do the following steps:

  1. make sure you have the following packages installed: git, cmake and kdelibs development package (on openSUSE this is git, cmake and libkde4-devel)
  2. create and change into a KDE development directory:
    mkdir ~/kde; cd ~/kde
  3. get a copy of the Kate code:
    git clone git://
  4. create and change into a build directory for compilation:
    mkdir build; cd build
  5. run the configure process with cmake:
    cmake ../kate -DCMAKE_BUILD_TYPE=debugfull \
  6. compile Kate:
  7. finally install Kate:
    make install

That’s all! This installs Kate locally into the separate directory ~/kde/usr, so that your global KDE installation will not be touched at all.

Now on to starting the newly compiled Kate. Create a file ~/kde/ with the following content:

#!/bin/bashexport KATE_DIR=~/kde/usr
export PATH=$KATE_DIR/bin:$PATH
# update KDE's system configuration cache
# start app

Now you can run the compiled Kate version with ~/kde/ kate. Just calling kate directly will start the system version of Kate.

Your copy of Kate contains all of the Kate code, i.e.: the KTextEditor interfaces, Kate Part, KWrite and the Kate Application. Feel free to send patches to our mailing list And join #kate on :-)

Note for KDE developers: All the changes in git are merged back to KDE’s subversion repository in a timely manner. So don’t worry about Kate moving away from KDE; this is not the case.

(Updated on 2010-04-17: Allow installation into local directory.)