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
I there something like jarter with tabs?
Kate has a tab bar plugin, if that’s what you’re asking.
I meant jarte
Kate also has a vi input mode so you can use it as if it were vi.
Kate and KWrite are two separate apps. They were different apps in KDE3 series, and are still different apps in the KDE4 series. They both rock, however.
The Kate project develops two main products: KatePart, the advanced editor component which is used in numerous KDE applications requiring a text editing component, and Kate, a MDI text editor application. In addition, we provide KWrite, a simple SDI editor shell which allows the user to select his/her favourite editor component.
You should have said goodbye to vi a long time ago (as well as the rest of them) and hello to Vim and GVim.
This series of articles seems about 10 years old, back when most of these projects started they might’ve needed some introduction. I imagine most casual users don’t even know what vi is and certainly haven’t been forced to use it (most non-casual users seem to confuse it with vim anyway).
I’m probably in a shrinking minority in that I still use vi(m) for quick edits and prefer emacs for programming.
Kate is an absolutely wonderful little and powerful editor.. I use it for most of the quick edits I do and even smaller programming jobs. When I need something more advanced for programming I still use Emacs. But lately I’m falling in love with KDevelop. Version KDevelop 4.0 has just been released a few days ago and it has wonderfull support for C++ code navigation and semantic syntax checking. And it’s editor part is also based on KatePart, So it looks like soon I may use Kate for everything.
You mention goodbye vi but you don’t mention kate’s vi mode?
What other editors are there around that work in ssh except nano and vi?
I use vim in ssh (putty). Kate doesn’t quite make it for me, I’ll stick to (g)vim.
Thanks for sharing with us. this is such a great information. i have just bookmarked your site and waiting for your next post