The Kate Handbook

Anders Lund

Seth Rothberg

Dominik Haumann

T.C. Hollingsworth

Revision 3.11 KDE 4.11 (2013-04-15)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Kate is a programmer's text editor for KDE 4 and above.

This handbook documents Kate Version 3.11


Table of Contents

1. Introduction
2. The Fundamentals
Starting Kate
From the Menu
From the Command Line
Drag and Drop
Working with Kate
Quick Start
Shortcuts
Working With the Kate MDI
Overview
The Editor area
The Documents List
The Built in Terminal Emulator
Using Sessions
Restoring old style Kate behavior
Getting Help
With Kate
With Your Text Files
Articles on Kate
3. Working with the Kate editor
Overview
Navigating in the Text
Working with the Selection
Using Block Selection  
Using Overwrite Selection
Using Persistent Selection
Copying and Pasting Text
Finding and Replacing Text
The Search and Replace Bars
Finding Text
Replacing Text
Using Bookmarks  
Automatically Wrapping text
Using automatic indenting  
Line Modification Indicators
The Scrollbar Minimap
4. Working with Plugins
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
5. Advanced Editing Tools
Comment/Uncomment
The Editor Component Command Line
Standard Command Line Commands
Using Code Folding
6. Extending Kate
Introduction
Scripting with JavaScript
Indentation Scripts
Command Line Scripts
Scripting API
Editor Component Extensions
Kate (C++) Application Plugins
Pâté Python Plugins
7. The VI Input Mode
VI Input Mode
Incompatibilities with Vim
Switching Modes
Integration with Kate features
Supported normal/visual mode commands
Supported motions
Supported text objects
Supported insert mode commands
The Comma Text Object
Missing Features
8. Menu Entries
The File Menu
The Edit Menu
The View Menu
The Bookmarks Menu
The Sessions Menu
The Tools Menu
The Settings Menu
The Help Menu
9. Configuring Kate
Overview
The Main Configuration Dialog
The Kate Application Configuration
General
Sessions
Plugins
Documents
Terminal
The Editor Component Configuration
Appearance
Fonts & Colors
Editing
Open/Save
Extensions
Configuring With Document Variables
How Kate uses Variables
Available Variables
10. Credits and License
A. Working with Syntax Highlighting
Overview
The Kate Syntax Highlight System
How it Works
Rules
Context Styles and Keywords
Default Styles
The Highlight Definition XML Format
Overview
The Sections in Detail
Available Default Styles
Highlight Detection Rules
The Rules in Detail
Tips & Tricks
B. Regular Expressions
Introduction
Patterns
Escaping characters
Character Classes and abbreviations
Alternatives: matching one of
Sub Patterns
Characters with a special meaning inside patterns
Quantifiers
Greed
In context examples
Assertions
C. Installation

List of Examples

4.1. Some Example Queries
4.2. Example SELECT Query
5.1. char examples
5.2. Replacing text in the current line
5.3. Replacing text in the whole file
5.4. A More Advanced Example
5.5. sort vs. natsort
5.6. Join selected lines
5.7. Remove blank lines
5.8. Remove blank lines