Category Archives: Users

Kate’s Folding Code and Vi Mode to be improved by GSoC students

This year’s Google Summer of Code (GSoC) has started and the Kate project has been lucky to get two students who will work on improving Kate’s folding code and Vi input mode.


Adrian will work on improving the folding code which is in need of an overhaul:

My name is Adrian. I’m studying in Bucharest, Romania, but my hometown is Constanta, a seaside town from Romania as well. I am a 3rd year student at “Politehnica” University of Bucharest, majoring in Computer Science and Engineering. I have developed a passion for algorithms since High school when I participate in many programming competitions and took things to a new level during college.

My GSoC project is called “Kate Code Folding” and I believe its name is quite explicit.  I chose this project because I am very familiar with the editor, as well as its code folding bugs. :)  Besides that, I am pretty excited that I have to develop a new algorithm for this project and I must say I find this task very challenging. For a better understanding of my project, here there are 2 paragraphs from my proposal, with no details, just the main ideas:

My project idea is based on two elements. The first one is a new approach of the problem: transform one more complex problem into two simpler problems. To be more specific, as far as I know there are two types of programming languages: there are languages that use syntactical elements like {} or any other begin/end constructions (e.g.: C/C++) and there are languages that use indentation level to define their code blocks (e.g.: Python).

The second idea is to have the new implementations compatible with the current one. What I mean is that most of the actual public functions will still be used in the new implementation (some of them will suffer a few modifications), to solve the dependencies problem in a smart and simple way. So there won’t be too many changes in the other source files.


Svyatoslav will work on improving the Vi input mode in Kate:

I am Svyatoslav Kuzmich. I’m a 2nd year student of Moscow Institute of Physics and Technology, department of Radioengineering and Computer Science.I usually write something like emulators and compilers but this Summer I am doing GSoC for KDE. I want to improve Vi input mode for Kate kpart. There are a lot of features already implemented. In some ways they works rather good. But there are some commands do not work like commands in Vim. So I want to fix them and to expand the list of commands by adding some insert and command mode’s commands for working with Kate’s tabs, window splits and bookmarks.

In more behind-the-scenes work, Svyatoslav will also write an extensive test suite for the Kate Vi Mode to make it easier to introduce new features without at the same time introducing regressions. This work has already begun.

We will try to keep you updated throughout the summer. Please wish our GSoC students good luck! :-)

Kate’s Tab Bar Plugins

If you check Kate’s plugin list, you will recognize that there are two different tab bar plugins available. The first one is Tabify. This plugin adds a standard KDE tab bar to the top of Kate’s main window:

The plugin shows the same entries as the “Documents” tool view on the left. With drag&drop, the tabs can be moved around. In KDE SC <= 4.6.2 this plugin is called Tabify. In KDE SC >= 4.6.3 the name is simply “Tab Bar”.

There is another plugin, called Tab Bar Extension in KDE SC <=4.6.2 (and Multiline Tab Bar in KDE SC >=4.6.3) that also adds a tab bar to Kate’s mainwindow:

As can be seen, this tab bar can be configured to span multiple lines in order to show more documents at the same time. Further, there are features like tab highlighting so that a document can quickly be found when working on a huge list of documents. There are more options in the configure dialog of this plugin (click small configure button on the right). In KDE 4.7, it is possible to change to highlight a tab by clicking on it with the middle mouse button and clear the highlight with CTRL+middle-click.

There have been requests to remove the non-standard plugin from Kate and just provide the standard conform Tabify plugin. I was about to do that, but then, we do have users that use the multiline tab bar. And as it works well and provides some features the default tab bar does not have, I’ve finally decided to keep it.

It is worth to mention that there were quite a lot of voices in the past requesting a tab bar. It was even requested to remove the “Documents” tool view, listing all the documents. However both tab bar plugins are not able to provide easy access to the opened documents, if you have e.g. 50 documents opened. Hence, the Documents tool view will remain the default, just as it always was in Kate’s life :)

Kate in KDE 4.6

Some days ago KDE 4.6 was branched. So what will Kate in KDE 4.6 bring?

  • The new tree view as “Documents” sidebar completely replaces the old file list. It supports the simple list mode as well as a pseudo-intelligent tree view to group files. The “Documents” tab is now implemented as plugin (always loaded), meaning that it brought a code cleanup as well. We hope you like it! :)
  • Swap file support, meaning that you can recover all your unsaved data for local files on the next Kate startup.
  • Ability to always load plugins.
  • New SQL Query plugin. The day we blogged about it had the most visits in the entire history. So it seems the the SQL plugin is a really nice addon for web developers! :)
  • New GNU Debugger (GDB) Plugin!
  • New Highlight Selected Text Plugin.
  • Ability to add scripts to the menu and bind shortcuts.
  • Kate got a new homepage on featuring WordPress.
  • Lots of bugs fixed since the KDE 4.5.0 release.
  • SmartCursors and SmartRanges are gone, resulting in more stable and clean code. MovingCursors and MovingRanges replace the old classes and work reliable. For instance, KDevelop is already ported leading to less crashes.
  • Christoph found the emails of the early days of Kate again. A funny read! :)
  • Daily unit test runs. We have more and more unit tests, securing the correct behavior of e.g. search&replace, the text buffer, encoding detection or indenters.
  • Kate development mostly moved to KDE’s git infrastructure, resulting in very easy build instructions.
  • The default settings of a session are now stored in the katerc file again, rendering the default.katesession obsolete. This means you will have to configure your default session again (sorry!). On the other hand, this fixed quite some bugs with regard to the session handling.

Credit where credit is due!

There were lots of developers involved who helped to improve Kate. Thanks a lot to every one of you! Without your contribution, Kate would not be what it is :-) Keep it up!

Highlight Selected Text

Kate has a new plugin called “Highlight Selection”. Since it is a KTextEditor plugin, it is available for all apps using KatePart (e.g.: Kile, Kate, KWrite, KDevelop etc). What does it do? If you select a whole word, all occurrences of this word are highlighted as well:

You can jump to the next occurrence with ctrl+h (btw: ctrl+h works already since KDE 4.2 or so). The plugin will be included in KDE 4.6. If you can’t wait, you can use it already now by building Kate from the sources.

(Side note: Be careful with enabling this plugin in KDevelop, since KDevelop itself is already doing extensive highlighting)