Articles

Development sprint results

The below notes is what was decided at the development sprint in Darmstadt on April 11-13, 2008

Short term goals

  1. Scripting, part level QtScript
  2. API for indentation scripts
  3. Sessions handling
  4. make text completion work!
  5. VI-Modes (GSoC-project)

Long term goals

  1. Scripting at application level (Kate): Kross
  2. Combination of highlightings & indentations

Insertion templates

The insertion template system is one of the hidden gems of KatePart, modelled after a similar feature in the eclipse IDE by Joseph Wenninger.

Insertion templates allows to insert a text snippet into the editor that contains variables like user name, date and similar, or fields that may be filled out by the user. Such fields can be repeated within the template text and can then be edited at once, they are highlighted in a special way (underlined) and are navigated between simply by pressing the TAB key.

The Variable Based Indenter

This article was originally published as a blog at http://www.alweb.dk/blog/anders/autoindentation at 2004/11/02.

NOTE Mon Nov 1 16:49:03 CET 2004: revised versions of the variables for both perl and bash. Also update kdelibs/kate/part.

Some time ago, when I convinced Laurence Withers to contribute a XML auto-indenter to Kate, I got the idea that we should also have a more flexible indenter that could be configured using the document variable system. The other day while commenting on this bug I was reminded again. So in one of my usual streaks away from my overfilled TODO list, I sat down and implemented one last night..

Embedding KatePart in your application

© 2005 by Dominik Haumann

If you need a more powerful text editor part than a simple KTextEdit the way to go is to embed a katepart into your application. This HOWTO assumes you already have a working KDE application based on a KMainWindow. You can achieve this for example with KDevelop templates.

Scripting KatePart with JavaScript

KatePart gained scripting support in version 2.5 (KDE 3.5) using the common language JavaScript (ECMAScript).

First some basics: A katepart represents a document and one or more views - that’s all. Scripts can access the document and the active view. As JavaScript supports functions and properties every function will be marked with a [function] and every property with a [property:read only].