All posts by Erlend Hamberg

GSoC 2012: Vi Input Mode

Like last summer I am mentoring a student working on Kate’s Vi mode this summer. This year’s student is Vegard Øye from Oslo, Norway. I’ll let him introduce himself:

My name is Vegard Øye. I am a computer science student at the University of Oslo, Norway. I also have a bachelor’s degree in electrical engineering from Sør-Trøndelag University College in Trondheim, where I programmed for integrated circuits. It was a lot of fun, so I decided to embark on a grade with an even larger emphasis on programming.

My goal is to make modal editing more widespread outside of Vim. There is a Zen-like benefit to using a tool that does just what you tell it to – slicing and dicing text with surgical precision. My focus is not on adding new features to Kate (although I have implemented a few), but on sharpening existing functionality. In particular, I want to improve the integration between Kate’s vi mode and its extension system, as well as sort out various bugs pertaining to the vi mode.

Vegard has already done some really great work, and his changes should be trickling in to Kate’s git repository the next weeks. You can follow his work at http://quickgit.kde.org/index.php?p=clones%2Fkate%2Fvegardoye%2Fvegard_gsoc_2012.git.

Added “gq” (format text) command for the Vi Input Mode

It’s been a nice week here in Berlin at the Desktop summit. I have even got some coding done. A command I often missed from Vim was the gq command that re-formats text based on your text width setting. For example, if you want to stick to a sixty-columns layout, you often have to re-format the text when adding or removing something, like in this screenshot where some text has been surrounded by HTML tags:

By using the gq command, the text will be re-formatted and looks nice again:

I have implemented this command now, so this will be in Kate for KDE 4.8. I hope other users of the Vi Input Mode find it useful too. :-)

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! :-)