• Users

    On-the-fly spellchecking in Kate

    by  • 2009-07-7 • Developers, Users

    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 [...]

    Read more →

    Kate linter plugin

    by  • 2009-01-15 • Developers, Users

    Just a quicky: I wrote a little plugin for KTextEditor which supplies you with basic error checking when you save documents. Currently only PHP (via php -l) and JavaScript (via JavaScript Lint) are supported.

    Screenshots

    PHP error
    list of errors

    Read more →

    Do you understand the word HTML?

    by  • 2008-04-16 • Users

    During the Kate developer meeting we also thought about simplifying KWrite and how to make the decision whether KWrite should be launched in full featured mode or in a stripped version. …well, and we found a really funny idea: Note, that this would even work, the question would be rather annoying, though The solution right [...]

    Read more →

    Kate Highlighting Power

    by  • 2007-09-12 • Users

    Kate’s highlighting capabilities are amazing. If you want you can highlight really complex syntax, without having to hardcode rules in C++. As an example, we’ll take a look at how Lua comments can be realized: –[=[ starts a multiline comment (the '=' chars are optional) ]=] ends the multiline comment the number of ‘=’ chars [...]

    Read more →

    Extending Kate by Scripts

    by  • 2007-07-21 • Users

    We have seen how scripting basically works for indentation. It’s also possible to register commandline functions (The command line is bound to F7 by default, or invoke View > Switch to Command Line). We will consider a small example again: sort the selected text. /* kate-script * name: unused * author: foo bar * license: LGPL * version: 1 * kate-version: 3.0 * functions: sorter */ function sorter (){    if (view.hasSelection()) {        var start = view.startOfSelection().line;        var end = view.endOfSelection().line;         var text = document.textRange(start, 0, end, document.lineLength(end));         var lines = text.split(“\n”);        lines.sort();        text = lines.join(“\n”);         view.clearSelection();         document.editBegin();        document.removeText(start, 0, end, document.lineLength(end));        document.insertText(start, 0, text);        document.editEnd();    }} The header line functions: sorter [...]

    Read more →

    Kate: More on Indentation Scripting

    by  • 2007-07-20 • Users

    My last blog was about the theory of how indentation works by using javascripts. Now we will look at a concrete example: a LISP-style indenter. (LISP indentation is easy, that’s why it’s a good example). The rules: comments starting with ;;; always have indentation 0 comments starting with ;; should be aligned with the next [...]

    Read more →

    Kate Scripting: Indentation

    by  • 2007-07-18 • Developers, Users

    Kate Part in KDE4 supports the ECMAScript (JavaScript) language by using kjs. In KDE3 we had several hard-coded indenters in C++, the idea is to let scripts do all the indentation in KDE4. How does it work? It is similar to vim: You simply create a script in the directory $KDEDIR/share/apps/katepart/jscript. An indentation script has [...]

    Read more →

    Kate Modelines

    by  • 2006-02-9 • Users

    Kate Part’s modelines – also called Kate document variables – are Kate Part’s implementation of document variables, similar to Emacs and vim modelines. Document variables can be used to set Kate settings local to a file. This is for example for using another indenter than the one defined in the GUI settings. Or assume you [...]

    Read more →