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 if not I'll create them myself so at least the requests are in.

No comments: