Monday, July 13, 2009

Things that kate needs before I can really use it

I currently use jedit for my PHP development, but I'm always looking at other options. Jedit doesn't look great, and suffers from java oddities, as well as having an uncertain future.

I've tried eclipse, but it's even more of a hog than jedit is, and with the laptop I currently use for work it's simply not feasible.

Since I'm on something of a KDE thing at the moment I have of course looked at kate, and have done a number of times in the past. One I will say, is that kate has made great leaps since I first looked at it a number of years ago, and in a number of ways it is better than jedit. However, it is not quite yet at the point where I could really think about switching to it as it is missing a few things that I find crucial to my work.

I'm going to write about what those things are here, both as a baseline to compare against in the future to see how much further kate has come, and also to put my thoughts out there in the hope that these things get addressed (and I'm not opposed to looking into them myself if I get the time).

My first problem is the management of open files. In jedit I make use of the sessions plugin along with the "buffer list" plugin. This gives me a list of files arranged in their hierarchy on disk. Note that this is distinct from the filesystem browser that kate already has, because it only shows open files (and directories that contain those files). Also supported are options to show the list flat or in a hierarchy, crop the start or end off long paths and filenames, and intelligently use the home directory metacharacter ~ when possible. Of course the files in the list are all right-clickable though which they can be closed and reloaded etc, and directories can also be right-clicked which allows operations to be performed on all files beneath it.

Having said that, kate's sessions support appears to be more robust than jedit's, and also integrates very nicely into krunner (try bringing up krunner and type in a kate session name).

Another thing (and this is missing from Eclipse too) is vertical block selection support. kate is ahead of Eclipse in this regard in that it does have this feature, though it is incomplete when compared to jedit's support. Missing from kate is support for a modifier key for temporarily enabling vertical selection mode, and more importantly being able to edit within a vertical selection. jedit allows you to select a zero-width column of text and then start typing, and what you type is reflected in all rows you have selected. This is a big time saver when reformatting code, and is something that I use a lot.

Another detail is more configurable visible whitespace. kate already shows tabs, which is great, but I would also like to be able to see spaces too, and configure when they are visible. The jedit whitespace plugin allows you to independently configure the visibility of tabs and spaces at the start, end and middle of the line.

jedit has a very useful PHP parser plugin which is extremely useful for spotting errors in the current file. Though it does have a few problems with false positives, it is very good at spotting things that even PHP itself will not. Something similar for kate would be excellent.

Something that may really help to entice new users is some sort of plugin/extension manager. Again, jedit has a very good extension manager which allows me to browse, install and update extensions from within jedit itself. kate has a few plugins bundled, but I've not been able to find many more than that. Other parts of kde seem to have very good integration with online repositories for things like themes and plasma widgets, so it would be nice to see similar integration here too.

Something that drives me nuts is not being able to switch documents quickly. kate gets off to a good start with the Quick Document Switcher plugin, which mirrors a similar jedit plugin. However, it does not appear to be able to work in a case insensitive fashion, which slows you down since you need to worry about getting the case exactly right when trying to switch to a file. My biggest problem is that there seems to be no way to cycle the documents in most recently viewed order (usually via the CTRL+TAB and SHIFT+CTRL+TAB shortcuts), which is something I use very often.

When saving a new file, I will often copy and paste an existing file both as a template, and also so that the Save dialog box will open up in the same directory as the last file I edited. However, in kate it seems to open up in the directory of the last file that I opened, which results in more directory navigation.

Opening files also seems to be more of a pain than it should be, mainly because the open dialog box shows the backup files (*~) as well, which makes selecting a range of files harder than it should be.

The search and replace dialog box could, in my opinion, do with a little adjustment from the point of view of tab ordering. I want to be able to enter the search term, enter the replacement term, and hit ALT+A to replace all. However, currently I have to tab through a number of other controls between the search and replace boxes.

I would also like to have the search and replace history easily accessible. In jedit, the search and replace text boxes have a drop-down feature that allows you to access the most recently used strings.

Another search oddity (to me at least) is that the search term appears to be local to the file. So I can't search for something in file A, switch to file B and hit F3 to continue searching. I have to bring up the find tool and enter the search text again. I'm sure that some people like it that way, so I think an option to choose between the two methods would be nice.

kate is also missing the configurable column line feature that many editors have, which allows a vertical line to be drawn at a set number of columns. This allows easier conformance to a coding standard. Bonus points if it allows for multiple lines to be defined and drawn too.

Well, I think that will do for now. I plan to see if any of these issues have bugs/wishes raised for them already in bugs.kde.org: if not I'll create them myself so at least the requests are in.

Saturday, July 04, 2009

Help! I'm being sucked in!!!

So I have blogged previously about KDE 4.0 and 4.1, and how they weren't there yet (though 4.1 was a definite improvement), and how impressed I was with 4.2.

A week ago I tried to install a PPA so I could try Amarok 2.1, but the PPA also happened to contain the latest beta version of KDE 4.3 as a whole. Oops. So anyway, I went with it, and aside from the odd crash now and again it has actually been pretty stable.

With the first release candidate I got the new Air theme, and very nice it is too! A far fresher and brighter look.

Also included is the ability to connect to a hidden wireless network: a quite shocking deficiency in previous versions, but better late than never I suppose.

The fade desktop switcher is also quite nice, though I still can't decide whether I prefer that over the spinning cube or not. The thing I like about the spinning cube is that it enhances the impression of my desktops bring physically adjacent in the 3d world, while other switchers don't.

Desktop effects now automatically suspend if things become too much for the system, which makes sense and should help out if you have a runaway process that you need to kill, or if you are doing something like running a game.

Another new feature is a panel spacer, which is the solution to the problem I commented on earlier about widgets wanting to occupy lots of space. Unfortunately, I find it quite fiddly to use. I also still don't understand why the clock widget needs to try to occupy so much space either. Shouldn't it just use what it needs to show the longest time string possible with the current settings and leave it at that?

The system tray has also had some attention: there is now an expand/contract widget that I hadn't noticed before to allow you to see hidden icons, and icons can be manually configured to be hidden based on category.

There is a new launcher menu called Lancelot, which has an interesting "no-click" user interface feature. I'm trying it now, and it seems to be pretty useful.

There are quite a few other changes, but these are the ones that I've noticed the most. In general, there is just a sense of greater polish than 4.2, which suggests a very welcome trend in increasing quality.

The reason for my title post though, is that I've now found myself being drawn a little bit more into the KDE world. After the upgrade to RC1, my GTK apps lost their widget theme and reverted to the very ugly standard GTK look. I fiddled a little bit but could not fix it.

I hate ugly user interfaces, it makes me sad to use them. :) So I thought I'd try kmail again. I have tried kmail a number of times in the past (indeed my accounts were all set up already when I fired it up as a result), but it has never grabbed me and I have always ended up back with Thunderbird.

However, this time I have found myself sticking with it. It's hard to say why, but it's probably more to do with it doing what I would miss in Thunderbird if it didn't do it. Things like sorting threads by the most recent message in the thread: I couldn't cope without that.

But there is also a feature that it has that I don't think Thunderbird does have. You can exclude folders from being acted upon when new mail arrives in them. This means you don't get any notification, and the folder doesn't count towards the unread messages total that sits in the system tray.

I've never used an unread message icon with thunderbird before (if one is even possible) because the nubmer would be meaningless: it would include folders that I don't want to read often (such as mailing lists) and some that I keep unread as the number of unread is actually what I'm most interested in. I have a folder which contains exception emails from work which I have filtered to keep only the last 24 hours of emails unread. So if the number of unread goes up, it is an indication that something is going wrong.

So the total number of unread is basically meaningless. But with kmail I can exclude those folders from consideration, so I end up with a smaller count that represents email that I actually want to check.

Aside from that, kmail just seems a lot more snappy than Thunderbird (KDE 4 as a whole seems really snappy, so this just continues the impression). The memory usage also seems to be quite a bit lower too.

The downside is contact integration with gmail: I have seen example of people getting this (and Google calendar synchronisation) working, but so far have not figured out how to do it myself. Hopefully soon!

So another KDE app draws me in. What's next?