Skip to content

Posts 

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. reformat paragraph: An intelligent reformatter for paragraphs. Should be rather straight forward to implement. XML tools: In KDE3, Kate once had a xmltools plugin. Unfortunately noone ported it to KDE4. The plugin provided lots of very useful features for xml editing. For example, you could select text and then wrap it with xml elements, e.g. “text” would become “text”. This is a perfect example for a command line script as well. Any volunteers? :) Scripting also brings us closer to fixing the following reports: 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. So instead of using this blog as reference, please use the handbook later for an up-to-date version. To script something useful, you’ll need to know the scripting API. All the available functions are documented in the section Scripting API in the handbook as well. Enough said, here we go: Read More

first experience with Archlinux

Sunday, 18 October 2009  | Milian Wolff
So, I kinda messed up my desktop right after the upgrade to karmic, because I was too greedy for performance and converted my root file system to ext4. Well, that worked like a charm on my laptop, but it broke my desktop. This is in no way karmic’s fault, it’s my own misbehavior. Thankfully I could rescue most of my data. Since I’d had to reinstall anyways, I decided to finally try out Archlinux. I find the rolling release mantra very intriguing. Together with a “simpler” packaging, namely no splitting between -dev and -dbg packages like debian/ubuntu does, this is destined to be a good environment for a developer. I always hated it to track down missing -dev packages when compiling software. And don’t get me started on outdated software in repos… I just compiled kdelibs and the only missing build dependency was hspell, that I don’t need anyways. Under Jaunty I had to compile stuff from kdesupport to fulfill updated dependencies. And the list of not-found optional dependencies was huge, since I did not spent time to install all those -dev packages by hand… 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. extended scripting support in the command line, more on that later more and more mature vi input mode lots of bug fixing. quite impressive bug squashing by Pascal Létourneau for more than 4 months now lots of refactoring and code cleanups thanks to Bernhard! “Find in Files” appears by default again in the tool view, “File Browser” uses UrlNavigator, huge code cleanup convenience updates of syntax highlighting delayed highlighting of code folding ranges to prevent flickering on mouse move new command line commands: ‘toggle-header’ in the Open Header plugin. ‘grep’ and ‘find-in-files’ haskell and lilypond indenter much, much more, see commits for details. Thanks to all contributors involved in Kate development. Keep it up :) Read More

Improved PHP support in Kate

Wednesday, 26 August 2009  | Milian Wolff
Not only KDevelop gets better and better PHP support — the Kate PHP syntax file also got a few new features and fixes over the last weeks. The good thing is of course that all users of KWrite, Kate, Quanta, KDevelop and other editors leveraging the Katepart benefit from these changes. Improved HereDocs screenshot of improved highlighting in PHP heredocs Read More

Followup on Kate’s on-the-fly spellchecking

Wednesday, 8 July 2009  | Dominik Haumann
As there was a lot of feedback in the last blog, I’ll answer some of the questions here. Where can I get this patch? The relevant subversion revisions are r992778, r992779, r992780, r992784. Will it be available in 4.3, or only in 4.4? As KDE 4.3 will be released end of the month, this feature will be available in KDE 4.4 and not earlier. Please, please tell me that it’s powered by Sonnet, one of the most awaited KDE4 pillar by me… Yes, it uses Sonnet :) The old spellcheck dialog however still uses the old spellchecking code without Sonnet. Any volunteers to port this? Also, the on-the-fly spellchecking needs to be more configurable in Kate’s config dialog, e.g. selecting the correct language. 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: svn co svn://anonsvn.kde.org/home/kde/trunk/tests/katetests Now all the data is there for testing. Read More

Kate linter plugin

Thursday, 15 January 2009  | Milian Wolff
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 <span class="re5">-l</span>) and JavaScript (via JavaScript Lint) are supported. Screenshots PHP error list of errors Requirements usual tools for compiling C++, e.g. gcc. cmake Qt development packages, i.e. under Ubuntu: <span class="kw2">sudo</span> <span class="kw2">aptitude</span> <span class="kw2">install</span> libqt4-dev KDE 4.2 with development packages for kdelibs and kdebase, i.e. under Ubuntu: <span class="kw2">sudo</span> <span class="kw2">aptitude</span> <span class="kw2">install</span> kdebase-dev kdebase-workspace-dev kdelibs5-dev. Note: You’ll need the experimental KDE 4.2 packages activated as of now, see for example the Kubuntu news on KDE 4.2 RC1 for hints. proper setup of environment variables, read this techbase article for more information. the .bashrc linked there should be enough for most people For PHP support: a PHP executable which supports the -l switch for linting For JavaScript support: a JavaScript Lint executable, you could download and compile the sources for example. Installing Get the sources for the linter plugin from KDE SVN and compile it, using e.g. the functions supplied via the .bashrc mentioned above: Read More

System Load Viewer

Friday, 2 January 2009  | Dominik Haumann
Last year I’ve blogged about the missing system monitor with the three bars for the panel and about its port to Plasma. Meanwhile other developers also did a port called System Status. In a collaboration with them we finally have the applet back in KDE’s subversion, the name is now “System Load Viewer” and it uses the data engine “systemmonitor” that already exists in KDE 4.2. So if you want to have the plasmoid for your KDE4.2 desktop, it should be straightforward to compile/install. On the screenshot you can see the plasmoid in action. There are two instances, one on the panel and one on the desktop. The one on the left is the KDE3 one. It’s worth to mention that the plasmoid already supports more featues than the KDE3 version. Features include: Read More