Hello Kate, goodbye vi
In my last article I introduced you to Gedit (see "Gedit: No more text-based editor for you!") and, as promised, this time around we will examine the KDE equivalent...Kate. Kate is an interesting beast in that it is comprised of two parts: KatePart (which is the underlying editor that is also used in other KDE components that require an editor) and Kate (the actual text editor). Kate is a complete rewrite of the older kwrite. And, like Gedit, Kate offers a number of outstanding features. In this article I will introduce you to Kate.
For a simple text editor, Kate packs in a lot of features:
- MDI, window splitting, and window tabbing.
- Spell check.
- CR/CRLF/LF newline support.
- Encoding support.
- Encoding conversion.
- Regular expression find/replace support.
- Syntax highlighting and bracket matching.
- Code and text folding.
- Infinite undo/redo.
- Block selection.
- Auto indentation.
- Auto completion.
- Shell integration.
- Numerous protocol support (http, ftp, ssh, webdav etc.).
- Internet transparency.
- Plugin support.
- Customizable shortcuts.
- Integrated command line.
That's no short list for a simple text editor. But how does it stand up to other such tools? Is it the text editor you've been looking for?
When you open up Kate (click Accessories > Kate) you will see a two-paned window (see Figure 1). The left pane serves as a "tab navigation". Instead of files opening in tabs, as they do in Gedit, they open up in a list on the left pane. In order to switch between open files you simply have to click on the name listed in the left pane to go back to that particular file.
One nifty feature of Kate is session saving. Say you have numerous files open for a project and you need to stop working on the for a bit of time. You can save that session and then, when you're ready to start working again, open that session back up. When you open the session up it will have retained all of the open files for you so you don't have to go back and open them one at a time.
To do this all you have to do is click Sessions > Save and then give your session a name. To open a session click Sessions > Quick Open and then select your session.
And of course, Kate does Syntax highlighting. Figure 1 shows how Kate highlights the same script I illustrated with Gedit. You can easily change the syntax highlight style by clicking Tools > Highlighting and then select the type you want. The type show is Bash.
What would a Linux editor be without a terminal included? Well, Kate sure thinks they would be worthless, because she has one built in. If you click on the Terminal button at the bottom of the window you will open the terminal window (see Figure 3) which is a full featured terminal. Just for fun, I opened up the same script in the terminal for you to compare.
Kate is a very powerful editor that can do handle just about anything any other editor can. give Kate a try, it just might turn out to be one long-term relationship.Advertisement