---

Overview of Kate Editor in KDE 4.12.3

Kate (the KDE Advanced Text Editor) is the well know, powerful text editor that ships by default in KDE, and has plenty of powerful features for both simple text editing as well as programmers. Some of the well-known functions that it offers include indentation, syntax highlighting for hundreds of programming languages, block-selection mode or check-spelling.

about

Over the years, Kate received a lot of new features and many improvements, turning it into a feature-complete editor with support for a huge number of languages.

It’s a really fast and powerful tool for programmers, since it can be used for both simple text editing, as well as source code in any language, keeping a pretty light interface.

Except for the menu and the toolbar, the interface is divided in three major sections, as well as a bottom bar for the search and replace function. To the left there is a side panel listing open documents or projects, while the bottom status bar provides information about current line and column, filename and encoding. The rest of the window is taken up by the editing area itself, which can list line numbers or display arrows to collapse or extend blocks or code or functions. Kate properly detects function begin and end in various languages, so this feature is quite useful and improves readability, helping you to make your way in a large source file and focus on the active task.

Collapsing or extending functions:

collapse

Kate can work with multiple files at once, organizing them in the Documents panel to the left. Firefox-style shortcuts like Ctrl+W to close the current document are also available in Kate. Except for single-file editing, Kate allows you to create and save projects as a collection of files.

The View menu will allow you to split the current document window horizontally or vertically, the vertical mode being quite useful for widescreens.

Kate provides a recent files list for quick access to the last files that you edited (available
via the File-Open Recent menu entry), as well as an Open With menu to open the current file in another application. Exporting the current file to HTML is also possible, and Kate will create an HTML file formatted according to the indentation of the current file, preserving the syntax highlighting colors as well.

One of the features implemented in Kate is the Vi-style editing mode, which allows to use Kate in the same manner as the popular console editor Vim. So the Vim users will feel at home once at the mode is enabled. While in this mode, press I to enter Insert mode and edit text, press Escape to enter Normal mode and use commands like :w or :q to save or quit Kate, as well as pressing H, J, K and L to navigate in the file. To enable this mode, to Edit-Vi Input Mode or press Alt+Ctrl+V.

Vim users will feel at home when the Vi mode is enabled:

vi

Syntax highlighting is pretty complete in Kate. Except for definitions for the major languages out there like C/C++, Java, Perl, Python, PHP or markup languages like HTML/CSS, XML, Kate also comes with syntax highlighting for a lot of less used languages, as well as scripts in different languages, including Quake configuration files or even CubeScript used by AssaultCube. So regarding this feature, virtually any language is covered up.

Syntax highlighting covers a huge number of languages:

syntax

Indentation is another feature of Kate, and you can set in the settings if you want to use spaces or tabulators, as well as specifying the width of tabulators (default is 8 spaces, but this can be changed).

Kate has support for sessions, so when it runs it can start up clean with an empty file, or load the last sessions, or load a session of your choosing, and restore all the opened files in that session.

Tabs support is yet another cool feature, and you can use Firefox-like shortcuts to create a new document in a new tab (Ctrl+N) or to close the current tab (Ctrl+W).

Tabs in Kate:

tabs

There is also word completion support, to auto-complete a word met before in a fast manner.

Kate integrates spell-checking as well.

Other notable features include a search and replace module, fullscreen mode, bookmarks or the useful block selection mode.

Regarding the block-selection mode: being available in the Edit-Block Selection Mode menu entry or using the Ctrl+Shift+B keyboard shortcut, this feature allows you to select blocks of text, instead of whole lines, meaning you can select exactly the text up to a certain column. See the following screenshot:

One of the editing modes added recently is the Vi input style.

Kate has enough configuration options to fit most of the users out there, which will be able to make it behave differently than the default.

Configuration window allows you to change various aspects of Kate:

configure

The plugins include a simple GDB frontend, templates, or a tab bar.

Kate plugins:

plugins

Tab bar plugin:

tabbar
Resources

Homepage
Vi Mode