Wish: Options for Kate’s Indenting Scripts

Posted: under english, kde.

At the start of Kate’s indenting script for C/C++, the following options are available:

// BEGIN USER CONFIGURATION
var cfgIndentCase = true; // indent ‘case’ and ‘default’ in a switch?
var cfgIndentNamespace = true; // indent after ‘namespace’?
var cfgAutoInsertStar = false; // auto insert ‘*’ in C-comments
var cfgSnapSlash = false; // snap ‘/’ to ‘*/’ in C-comments
var cfgAutoInsertSlashes = false; // auto insert ‘//’ after C++-comments
// END USER CONFIGURATION

To set these options one would first have to actually find the indenting scripts under /usr/share, then copy it to one’s home directory to be able to modify it, and then modify the javascript source. This could – of course – be done in a much better way. In an ideal world options like these should be available in Kate’s settings as check boxes. It should also be possible to have non-boolean options, like choosing a value from a list of possible values for a setting.

I would love to see something like the following:

registerSetting(”Indent ‘case’ and ‘default’ in switch statements”, “cfgIndentCase”,  “boolean”);

produce

☑ Indent ‘case’ and ‘default’ in switch statements

in Kate’s settings.

I don’t have the time myself, but I don’t think it would be very hard, and I’m sure that many people would be a bit happier. Me and the other Kate developers would glady be of assistance. ☺

del.icio.us Digg Facebook reddit

Comments (0) Nov 02 2009

Kate’s Vi Input Mode — What will KDE 4.4 bring?

Posted: under english, kde.

Dear “Katevim” users.  Kate’s Vi Mode is steadily improving and I want to take a moment to tell what’s on the horizon for KDE 4.4. There has been quite a few bugs fixed since 4.3, but some major new features have also been introduced:

The Comma Text Object

This is something that I have been missing in Vim. The comma text object makes it easy to modify parameter lists in C-like languages and other comma separated lists. It is basically the area between two commas or between a comma and a bracket. In the line below, the three ranges this text object would cover is highlighted in red.

Comma Text Object

Comma text object ranges. If the cursor is over, say, "arg2", pressing c i , ("change inner comma") would delete "double arg2" and place the cursor between the two commas in insert mode. A very convenient way to change a function's parameter

This has actually been in Kate’s Vi Mode for a while now, but since it has not been announced until now, I guess I am the only one using it. :-)

Limited Normal Mode Mapping Support

It is now possible to add mappings in normal mode (:nnoremap in Vim). There are still some flaws, such as the fact that one cannot map a keypress to “:somecommand<enter>“, but hopefully people who are using dvorak/colemake can make use of the vi mode now.

It is now possible to map keypresses in normal mode

It is now possible to map keypresses in normal mode

Command Line Mode Commands

Yes, really! Kate’s Vi Mode finally support some of the most command commandline mode commands from Vim. What can be done from the Kate editor part is limited by the fact that it can’t control its hosting application, but Kate – the application – has now gotten support for the following commands:

  • q, qa
  • w, wq, wa, wqa
  • x, xa
  • bn, bp
  • new, vnew
  • edit
Kate showing help text for the wq[a] command

Kate showing help text for a command line mode command

del.icio.us Digg Facebook reddit

Comments (19) Oct 26 2009

Nidelva

Posted: under bilder.

Nidelva, originally uploaded by ehamberg.

del.icio.us Digg Facebook reddit

Comments (2) Jul 26 2009

How Kate got X-rated

Posted: under english, kde.

(Ok, not really.)

Kate’s maintainer, Christoph Cullmann, shared a funny story over a beer one of the first days here at GCDS.

In ye olden days, what is now Kate and Kwrite was one application called “KWrite – KDE’s Advanced Text Editor”. However, the author of Kwrite mysteriously disappeared. Christoph forked Kwrite and continued working on it and after some time it greatly surpassed Kwrite’s capabilities and was becoming more of a power tool. A name change was long overdue.
Being a good German, Christoph decided to name it after the philosopher Immanuel Kant, so in KDE 2.1 the editor “Kant” was born.
For some strange reason, probably easier to understand for native English speakers, it was renamed to “Kate” in KDE 2.2. And thus what still is KDE’s Advanced Text Editor was born.

del.icio.us Digg Facebook reddit

Comments (4) Jul 08 2009

Rillete yoghurtbunn

Posted: under erlends spennende liv.

Jeg liker å spise yoghurt, men som forklart i følgende henvendelse til Tine har jeg et irriterende problem nå i mai. Forhåpentligvis vil dette problemet bli løst for fremtidige generasjoner. :)

Brekkie
Creative Commons License photo credit: Szczur

Read More

del.icio.us Digg Facebook reddit

Comments (1) May 18 2009

Google Calendar Plasmoid, Take Two

Posted: under english, kde.

After the positive feedback on my quick 27 line python hack, I decided to make a slightly improved version. This fixes the two major problems with the old one: you can now use your Google Apps for your Domain email and you can use kwallet to remember your login.

gcal2

gcal_settings

It’s not a simple, 27 line python script any more, but now it’s much more usable. (unless there are some stupid bugs I have overlooked. :) )

As suggested I uploaded it to KDE Look: http://www.kde-look.org/content/show.php?content=104182, so you can install it from the “Add widgets…” dialogue or download it and install it with plasmapkg -i gcal-1.1.plasmoid.

Read More

del.icio.us Digg Facebook reddit

Comments (5) May 07 2009

Google Calendar Plasmoid

Posted: under english, kde.

Update: A new, better version can be found here:

http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/

In case anyone is interested:

I made a simple Plasmoid for viewing coming events from Google Calendar. It’s simply a webview showing the iPhone version of Google Calendar. It’s written in Python and took 10 minutes to write (27 lines of code) by following the excellent tutorial on techbase.

gcal

You can download it here: http://hamberg.no/erlend/files/gcal.zip. If you improve it or make another Google Calendar plasmoid: let me know! :)

Oh, btw. To install it run plasmapkg -i gcal.zip.

P.S: openSuse users: I had to install python-dev to actually run a python plasmoid. Don’t know why.

del.icio.us Digg Facebook reddit

Comments (17) May 05 2009

Sjekkliste for hvordan skrive brev/epost på engelsk

Posted: under usortert.

Da jeg jobbet med ISFiT skrev jeg ganske ofte eposter på engelsk og da var English Mattersguide til hvordan en skal skrive eposter uunnværlig. Siden er laget av Stewart Clark på NTNU.

Nå og da slår jeg fortsatt opp for å se hvordan jeg skal titulere folk, og hvordan den tilsvarende avslutningen er. Jeg fant derfor ut at jeg skulle skrive ut denne og henge den ved pulten min, men det viste seg at den ikke var helt optimal med tanke på utskrift. Jeg har derfor laget en kompakt versjon på to sider som passer perfekt som en «cheat sheet».

Side én er en sjekkliste over ti punkter med generelle tips og side to er tabeller over hvordan en tiltaler alt fra forretningsforbindelser til venner. Teksten er noe kuttet enkelte steder i forhold til nettsiden for å få den til å passe på to sider.


application-pdf32 emails_and_letters.pdf
del.icio.us Digg Facebook reddit

Comments (0) May 01 2009

Elg!

Posted: under bilder.



moose, originally uploaded by ehamberg.

Vi fikk besøk av en elgkalv på hyttetur i helga. :)

del.icio.us Digg Facebook reddit

Comments (2) Mar 09 2009

Herman Düne

Posted: under bilder, isfit, musikk.



Herman Düne, originally uploaded by ehamberg.

Herman Düne på samfundet 28. februar. Fantastisk konsert. :)

del.icio.us Digg Facebook reddit

Comments (0) Mar 09 2009