Chapter 4. Working with Plugins

Anders Lund

Table of Contents

Editor Component Extensions
Scripts
Kate Application Plugins
Python Pâté Plugins
Available Plugins
Configuring Pâté
File Templates
Menu Structure
Using a Kate Template
Creating your own templates
Editing templates
The Kate Template Format
Thanks and Acknowledgments
XML Validation
Menu Structure
Thanks and Acknowledgments
XML Completion
How to Use
Features and Limitations
Menu Structure
Thanks and Acknowledgments
Exporter
Menu Structure
Search and Replace
Introduction
Interface
Menu Structure
Mail Files
Menu Structure
Filesystem Browser
Menu Structure
Interface
Configuration
Kate Snippets
Introduction
Menu Structure
Snippets panel
Using Snippets
Thanks and Acknowledgments
Build Plugin
Introduction
Using the Build Plugin
Menu Structure
Thanks and Acknowledgments
SQL Plugin
Introduction
Connecting to a Database
Running Queries
Browsing
Menu Structure
Thanks and Acknowledgments
GDB Plugin
Introduction
Menu and Toolbar Structure
Debug View
Call Stack and Locals
Thanks and Acknowledgments

Kate offers several types of plugins. There are plugins for Kate editor component, which are available to any application using the editor component, such as KDevelop, Quanta, Kile, KWrite and many others. There are also plugins only available in the Kate editor itself. There are two types of these plugins: some are written in native C++, while others are written in the Python programming language. There are subtle differences in these, described below.

You can enable any type of plugin in the configuration dialog, which also provides access to additional configuration options for plugins that require that.

There are many plugins for various purposes available and you can search the web for more. A few plugins are shipped with the editor component, for inserting automatic braces, insert files, and exporting text as HTML.

Editor Component Extensions

These plugins are available to any program using the Kate Editor Component. To learn how to enable, disable, or configure them, see the section called “Extensions”.

AutoBrace

The autobrace plugin supersedes the Kate internal Auto Brackets feature. It automatically inserts a closing brace } at the beginning of the next line after ending a line with an opening one { and pressing the Enter key.

Exporter

This command allows you to export the current document with all highlighting information into a HTML document using FileExport as HTML. Additionally you can use EditCopy as HTML to copy the currently selected text as HTML to the system clipboard.

Highlight Selection

Highlights all words that match the currently selected text.

IconInserter

The icon inserter plugin is only of use for KDE developers: It adds an item Insert KIcon-Code into the context menu of the editor. If activated, the KDE's icon chooser opens (showing application icons, action icons etc...). If you click on it, the file name without file extension will be inserted as text. Useful only for setting icons via KDE's framework through the KIcon() class.

Insert File

This plugin allows you to insert any readable file at the cursor position. If enabled, the Tools menu has an additional menu item Insert File.