Tag Archives: planet

Kate plugin updates part 1

KDE SC (or was it Platform?) 4.7 will bring some enhancements to Kate plugins. First up is the build plugin. The new thing for the build plugin is the ability to specify multiple targets per session. This means that you can build debug/releas/… targets without having to jump between sessions. The default setup/targets contain a configure target with a CMake command and a build target that runs make.

Screenshot of the default "Config" target

Screenshot of the default "Build" target

Targets can be added, copied and deleted. If the last target is deleted the default targets will be re-added.

When the targets are set up, you can of course select a specific target by selecting the settings tab and there select the desired target from the small combo box. To make target switching faster, there is a “Next Target” action. This action will switch to the next target in the target combo-box. If the settings tab is not visible it will open the tab to display the current target. There is no default shortcut-key for the actions, but fortunately it is not hard to change a shortcut in KDE applications :) My personal shortcut-setup can be seen in the build-menu screen-shot.

Screenshot of the "Build" menu

Next up will be the GDB plugin

Getting Involved

Recently we’ve had several feature requests in comments of a blog post. If you are interested, you can easily implement this and contribute to Kate. And I’ll even show you how to get started for the following feature. First, build Kate according to http://kate-editor.org/get-it/.

Adding support for ctrl+w {left, right, up, down} to switch the active view.

Kate has a vi input mode. This way, vim users can still use their default work flow but still use Kate at the same time. What’s missing in the current vi input mode implementation is support for view navigation. In vim, to move between different windows, press ctrl-w <arrow keys> to switch to the neighboring view. Implementing this is rather easy – the following steps need to be taken care of:

  1. Add vim bindings (=vim shortcuts) to the Kate’s implementation of the ‘normal mode’.
  2. In the implementation, find all visible KateViews.
  3. Compare the global coordinates of the window geometry by using QWidget::mapToGlobal(const QPoint& pos) (for QPoint(0, 0) and QPoint(width(), height()) of all KateViews)
  4. Call setFocus to the nearest matching of the visible views.

Patches are welcome :)

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

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

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 Behavior at Exit

From time to time it happens that bug reports get pretty much nasty. A single user or some users request a feature. If you argue, bashing starts.

In this case, it’s about Kate and the following scenario: You are editing several files (e.g. because you clicked on text files in dolphin). So Kate starts and you are not using an explicit session. If all files are saved, you can simply quit Kate. Bug #267356 requests, that the user is asked whether to save the session or not. Right now, if you are not using a session, Kate simply closes and the file list is lost. Comments are welcome, especially in the report. But please be objective and polite. Thanks…

PS: Sometimes open source development is real fun. Sometimes it’s not :p