Developers 

Kate Internals: Text Buffer

Tuesday, 2 March 2010 | Dominik Haumann
Right now, in Kate’s gitorious repository we, or rather mainly Christoph, is rewriting the heart of Kate: The text buffer. In this blog I’ll explain how the text buffer works in detail. After reading, you’ll be able to understand the code. And be warned: Probably you will be desperately amazed about its awesomeness! So this is a must read :^) Storage. Kate Part internally stores the content of a text document as a QVector of text lines. Read More

Design Ideas of the Kate::TextBuffer

Sunday, 28 February 2010 | Christoph Cullmann
Storage Basic idea: text stored as lines Lines hold text and additional data (like for highlighting) Advanced Concept: Stores lines in blocks of xxx lines, to have better performance Cursor Support They will move on editing Cursors can be combined to ranges KateTextCursor will be stored in the buffer blocks Transactions Each edit action must be encapsuled in a transaction startEdit/endEdit will do this Signals for starting and ending this transactions Revisions After loading, buffer has revision 0 Each edit action which is no nop will lead to increment in revision number Successful saving will reset revision back to 0 Editing Operations (only 4 different editing primitives) Insert Text (inside one line) Remove Text (inside one line) Wrap Line (wrap a line at given position, create a new line with content behind wrap position) Unwrap Line (unites the line with its predecessor) Signals for all of these actions, containing the change (to allow to layer undo/swap file support/…) on top of the buffer Load/Save & Encodings Loading will try to use given codec, if that doesn’t work, try to detect the codec by the BOM at start of file or use fallback codec, if that again doesn’t work, given codec will be used again, and errors reported Saving will just use the given codec Unit Tests Each of the above implementation details will be covered by unit tests KateTextBuffer (+KateTextLine and Cursor) must therefor be usable without other components

Kate Partly Moving to Gitorious

Saturday, 27 February 2010 | Dominik Haumann
We are about to move the applications Kate and KWrite as well as the libraries KTextEditor and Kate Part to gitorious. Christoph is working on the migration right now in order to keep the development history. Things look good so far, so the migration is soon finished. We have discussed a bit about the migration to gitorious on the Kate Developer Meeting and Christoph came up with this mainly because building only KTextEditor, Kate Part, KWrite and Kate is much faster and easier compared to building the KDE modules kdesupport, kdelibs, kdepimlibs, kdebase, kdesdk. Read More

Developer Meeting: More on scripting Kate

Wednesday, 17 February 2010 | Dominik Haumann
We are 10 people here at the developer meeting in Berlin. Kate, KDevelop as well as Okteta see a lot of commits. I’ll mainly talk about what’s happening in the holy Kate land, though :-) Yesterday I closed a bug requesting an “unwrap” feature in Kate that works like “Tools > Join Lines” but maintains paragraph separation, i.e., empty lines are not removed. This feature is implemented now in javascript. Further infos: Read More

Kate XML Completion Plugin: Help Wanted

Sunday, 17 January 2010 | Dominik Haumann
In KDE3 Kate had a plugin called “XML Completion Plugin”. It was able to list XML elements, attributes and attribute values and entities in a completion popup menu depending on the currently active DTD. For instance, it was able to complete all your KDE/docbook tags and, thus, was one of the best tools for writing KDE documentation. Unfortunately, this plugin has not been ported to KDE4, yet. So this is a request for developers: Please someone pick it up and make it available for Kate in KDE4. Read More

Scripting Kate

Sunday, 1 November 2009 | Dominik Haumann
In my last blog I explained Kate’s scripting features in KDE 4.4. To better understand how scripting can be used let’s look at some use cases. join lines: This feature request wants the action “join lines” to not join different paragraphs, i.e. not remove empty lines. We have not implemented this wish, as there are probably users who prefer the current behaviour. This request can be fixed by writing a small script that joins the lines according to the user’s wishes. Read More

Extending Kate with Scripts

Thursday, 29 October 2009 | Dominik Haumann
As mentioned in one of my last blogs, there has been quite some work for JavaScript scripting support in trunk recently. So what will Kate 3.4 (KDE 4.4) will bring? This is explained in detail in the sections: Indentation Scripting Command Line Scripting Some Remarks The scripting allows to extend Kate with lots of little helper functions. All users can add scripts as they wish. The documentation here is copied from the official Kate handbook. Read More

News from the Holy Kate Land

Thursday, 17 September 2009 | Dominik Haumann
Since we now all know that Kate is holy (thanks to rms. By accident, he obviously confused Kate with emacs, though) let’s have a look at what’s going on. In the last months Kate development is quite active, so here is a quick update: new: on-the-fly spell checking thanks to Michel Ludwig. Highlights include e.g. spell checking in comments of source code or latex parts. Also, constructs like sch”on work in latex. Read More

On-the-fly spellchecking in Kate

Tuesday, 7 July 2009 | Dominik Haumann
Christoph just added an awesome and long awaited feature: on-the-fly spellchecking. ‘Kate’s xml highlighting files now have an additional attribute in the itemData section: spellChecking=”true/false”. C++ comments and strings can be spellchecked now :) Same for all other languages such as Latex. Really big thanks to Michel Ludwig for the patch, good work! Screenshot for latex highlighting:

Kate Test Regression Suite

Sunday, 7 June 2009 | Dominik Haumann
This blog is mainly about documenting the process how to run Kate Part’s test regression suite and probably not much use for other developers. Step I: Setup the environment create the file ~/.testkateregression. The content of this file is a single line pointing to the folder of the checkout of the test regression suite data. For me this is /home/dh/kde/tests/katetests/regression/ Create the folder where you checkout the suite mkdir /home/dh/kde/tests Change to this folder Checkout the data: Read More