jmhobbs

Why I Love Kate

First of all, no, I haven't ditched my fiancée Darcy. I'm talking about the flexible powerful plain text editor that comes with KDE. I'm personally of the opinion that full blown IDE's are way over rated. I used Anjuta for about 6 months at work, and it really didn't impress me. My other issue is that I program in a bunch of languages. I tend to have projects going in 2 or 3 languages at once, and I haven't found a consistent IDE that covers C++, PHP and JavaScript well at the same time. Don't even say Eclipse, that thing is just ungainly.

So what to do? Well I ended up just going with the plain text editor of KDE, called Kate. Over time I've found some really great features that make this a flexible and powerful editor. These are just a few of them.

The Basics
The basics of configuring Kate are as powerful as any other "advanced" text editor. I trim down those fat tabs to being just two spaces wide, turn off wrapping and turn on the line numbering. Last I turn off automatic backups, because the tilde files are annoying and real men don't program with nets ;-). This is not a complete list of the core features by far, just about everything is configurable.

Highlighting
Syntax highlighting in Kate is very good, and handles oodles of languages. Plus it's colors are configurable by an easy interface. You probably won't change them though, as they are fairly consistent between languages, so variables will still look like variables even when you switch languages.

Bookmarks
This is one I didn't find until recently, but you can bookmark locations in files and jump there real quick. The shortcut it CTRL-B, and I usually use it when I'm working somewhere and need to reference some other code. I bookmark my spot then scroll away to the code I need to look at. Getting back is easy through the bookmarks menu, or if you are above it you can use the shortcut ALT-Page Down or if you are below it, ALT-Page Up.


A Bookmarked Line

The Bookmarks Menu

Sidebar
The sidebar is a powerful part of Kate. There are many plug-ins which can take advantage of the sidebar (which can actually be any combination of left, right, top or bottom bars). The ones I use are the C++ symbol viewer, the file list and the file chooser. The symbol viewer is handy for jumping around your files in C++, I use it a lot along with the bookmarks to check on code quickly. The file chooser is pretty standard, with a list view that includes icons for checking file type. Last is the file list. All your open files are in here. Two short cuts you will want to know are ALT-(Left Arrow) and ALT-(Right Arrow) which will scroll you through the file list. This is very handy for switching between files without leaving the keyboard. The file list is also "heat mapped" with colors on the last files you've been in. When closing a file (CTRL-W) you jump to the last file you were in.


The Symbol Viewer

The File Chooser

Sessions
Kate stores all of its setting in sessions, which you can name and arrange as you wish. This is handy as is, but there is integration with a KDE menu bar widget that makes them even better. This KDE sessions menu is great for jumping straight into projects and picking up right where you left off.


The Kate Session Menu

Useful Dialogs
There are several useful tool dialogs in Kate too. The first one is the GoTo dialog, invoked with CTRL-G. This is great for jumping to lines when fixing compile errors or debugging. The other handy one is Find and Replace. There are flexible regular expressions built in, with place holders for the replace dialog. I use this a lot when creating setters and getter for my methods. A few slick regex's and they are all written.


The GoTo Dialog

The Replace Dialog

Auto-Complete
The last feature is the helpful auto-complete. It's not terribly intelligent, it won't track down things by symbols and types, but it does the job and when it kick in is configurable, I have it set so after I type 3 characters it pops up suggestions.

I hope that this quick overview of Kate is helpful to someone, I just wanted to share my love for it. Good luck with your endeavors!