Plasma secrets: Make Kate more productive

Updated: December 26, 2018

The Kate text editor is a nice, versatile piece of program. But it's not without issues. While I do like it, and I do use in the Plasma desktop environment, the reason why we gathered here, I am sometimes frustrated with how the program behaves. The tab management is tricky, some of the functions are too hidden, and we also had to deal with saving sessions, which also goes toward making Kate more efficient.

As part of my everyday Plasma usage journey, with Slimbook Pro2 and Kubuntu, I'm trying to expose and then fix all sorts of niggles and issues that may arise, which often stand in between perfection and professionalism on one end and the everyday humdrum that is the Linux desktop. Hopefully, today, I can give you some useful pointers that will make you not reach out for a WINE app like Notepad++ as a solution. Which is exactly what I did, as I told you in my Slimbuntu experience report deux. Follow me.


Keeping the tab

So, the big problems with Kate tabs: 1) double-click on a tab, it jumps to the beginning of the tab bar, which can be annoying 2) the visual clarity of tabs is pretty bad, and it's hard to distinguish between the active one and the rest, as a single blue line (underline if you will) separates it from the rest of the interface 3) if you have too many tabs open, they won't really be scrollable like you'd expect from a tabbed text editor. Weird.

Top all that with a strong use of grays in Plasma, and this makes it hard to distinguish and manage open documents, but most importantly, it harms productivity, as you may need half a second to focus and find where your files be. I really needed a simple mechanism for tab management, but there's nothing in the options, it seems. We're starting at a rather low productivity point.

Kate, tabs weird

Enter the plugin

Of course. The Plasma Rule 34 - if there's a function, there's an option for it somewhere in the GUI. And there's one, indeed. But it is not obvious. What we need is a plugin, to enhance the basic behavior of the program, not unlike how Notepad++ does it, for instance. Under Tools > Configure Kate > Application > Plugins, you will find the plugins section.


There's a naming discrepancy here: plugins on the left, plugins manager on the right.

There are quite a few plugins available, and they do look quite practical - linting, syntax matching for various languages, embedded console window, debugger, database, and then, the important one, the Documents plugin, which is meant to give us a magical sidebar for document navigation. I enabled the plugin, restarted Kate, and observed the results.

Good stuff

And so, this little thing works really well. On the left side, you will have a marker, which allows you to open and collapse the Documents sidebar. It will show you all your open documents (tabs) and allow you to rearrange them as you see fit. The files will also be grouped based on their parent directory - again, this is very useful, plus it allows you to collapse document trees to reduce visual clutter. Or expand them if you like.

The plugin gives you rudimentary file management control, so you might be tempted to remove the other toolbars in your interface - or tweak what buttons do show there. Now, this is very cool, and definitely helps find files quickly and easily. Especially if you end up having 10-20 different tabs. The same could be said of Web browsers, but they often do it better (plus they have similar extensions, too), and if Kate enabled better clarity and multi-line tabs, there wouldn't be any real need for this plugin.

Documents, settings

Documents plugin working

Notice the alignment of lines and buttons; can be better.

Other things

Well, there are other improvements that can be done here. For example, the Search & Replace plugins give you quick access to this functionality, at the bottom of the interface. Tag completion and filtering is also rather useful. Not sure about document comparison or tab highlighting, but I think those would be quite valuable.

Search & Replace

Text editors don't necessarily have to be simple notes keepers - they can be very powerful development frameworks, project management tools, time management tools, and much more. Anything that starts as an abstract piece of text, boom, right there. Of course, simplicity is also important. Which is why I think Kate should offer more plugins that help people navigate the interface, access common functions and interact with the documents. Finally, the plugin manager only has about twenty odd entries. It's hardly a manager in that sense. Is there any online repo where more plugins are available? You get the idea.

The last productivity tip is to edit the color scheme and font styles for the different types of text shown, be it ordinary text, highlights, code, errors, etc. This means, regardless of what desktop theme you use, and what font color it imposes, you can tweak how Kate behaves. You can have different colors (and backgrounds) for each type of context, and then separately for normal, bold, italic, underlined, and strikethrough text. This can be useful if you need special visual cues when writing, in addition to the standard code syntax detection and whatnot.

Colors, ready

And behold, for 'tis ready:

Working, more


Some of you may find this tutorial trivial - but it is not. For the past twelve years, I've had a text editor running on all my production systems, with anywhere between six or seven and fifty tabs open at any given time. All the time. More on-the-air than any other piece of software other than the kernel powering it all under the hood. With Notepad++ in Windows, there's little I can't do. With Kate in Plasma, there are quite a few common things that I found myself struggling to do effectively, or not being able to do them at all.

Well, the use of plugins - Documents in particular - should make Kate more accessible. To start with, I'd love to see better tab control functionality integrated into the application. And then, everything else. Well, we played with LibreOffice. We handled Kate. Next, I'm going to work on WINE apps and see if I can make GwenView behave as I'd like. The journey continues. Hold on tight, let the flight begin.


You may also like: