# The &kate; Handbook

Seth
Rothberg

    sethmr@bellatlantic.net

2000
2001
Seth M. Rothberg
&FDLNotice;
2001-05-30
1.00.00

&kate; is a programmer's text editor for KDE 2.2 and above.

This handbook documents &kate; Version 1.0

KDE
kdebase
Kate
text
editor
programmer
programming
projects
MDI
Multi
Document
Interface
terminial
console

## Introduction

Welcome to &kate;, a programmer's text editor for &kde; version 2.2 and above. Some of &kate;'s many features include configurable syntax highlighting for languages ranging from C and C++ to HTML to bash scripts, the ability to create and maintain projects, a multiple document interface (MDI), and a self-contained terminal emulator.

But &kate; is more than a programmer's editor. It's ability to open several files at once makes it ideal for editing &UNIX;'s many configuration files. This document was written in &kate;.

## The Fundamentals

If you have ever used a text editor you will have no problem using &kate;. In the next two sections, Starting &kate; and in Working with &kate; we'll show you everything you need to get up and running quickly.

### Starting &kate;

You can start &kate; from the K menu or from the command line.

#### From the Menu

Open the KDE program menu by clicking on the big K icon on the toolbar at the bottom left of your screen. This will raise the program menu. Move your cursor up the menu to the Editors menu item. A list of available editors will appear. Choose &kate;.

Unless you configure &kate; not to, it will load the last files you edited. See Configuring &kate; to learn how to toggle this feature on and off.

#### From the Command Line

You can start &kate; by typing its name on the command line. If you give it a file name, as in the example below, it will open or create that file.

    %katemyfile.txt

If you have an active connection, and permission, you can take advantage of &kde;'s network transparency to open files on the internet.

    %kateftp://ftp.kde.org/pub/kde/README_FIRST

##### Command Line Options

&kate; accepts following command line options:

``kate` `--help``

  This lists the most basic options available at the command line.

``kate` `--help-qt``

  This lists the options available for changing the way &kate; interacts with &Qt;.

``kate` `--help-kde``

  This lists the options available for changing the way &kate; interacts with &kde;.

``kate` `--help-all``

  This lists all of the command line options.

``kate` `--author``

  Lists &kate;'s authors in the terminal window.

``kate` `--version``

  Lists version information for &Qt;, &kde;, and &kate;. Also available through ``kate` `-V``

``kate` `--licence``

  Shows license information.

#### Drag and Drop

&kate; uses the &kde; Drag and Drop protocol. Files may be dragged and dropped onto &kate; from the Desktop, &konqueror; or some remote ftp site opened in one of &konqueror;'s windows.

### Working with &kate;

Quick Start will show you how to toggle four simple options that will let you configure some of &kate;'s more powerful features right away. Keystroke Commands lays out some of the default keystroke shortcuts for those who can't or don't want to use a mouse.

#### Quick Start

This section will describe some of the items on the Settings menu so that you can quickly configure &kate; to work the way you want it.

When you start &kate; for the first time you'll see two windows with white backgrounds. Above the two windows is a toolbar with the usual labeled icons. And above that, a menu bar.

The left-hand window is a dockable side bar. It combines the Filelist and Fileselector windows. Switch between the two by clicking on the tabs at the top of the window.

If you've started &kate; with a file, the right-hand window will show the file you are editing and the Filelist on the side bar will show the name of the file. Use the Fileselector window to open files.

You can toggle the Filelist and Fileselector window on and off in Settings menu. This menu offers you your first glimpse into &kate;'s power and flexibility. In this section we'll look at four items:

Show Toolbar

  Toggles the toolbar on and off.

Show Filelist

  Toggles the Filelist on and off. If the Filelist/Fileselector window is not open, &kate; launches the side bar as a separate, undocked, window. To dock the window grab the two thin parallel lines above the tabs by clicking on them with your &LMB; and holding the button down. Drag the the window into &kate;'s editing window and release the &LMB; when you have positioned the Filelist/Fileselector window as you prefer.

  If you have grabbed the two parallel lines successfully your mouse pointer will turn into two crossed arrows as you drag.

Show Fileselector

  Toggles the Fileselector on and off. This menu item is the same as Show Filelist with one difference. Toggling it on launches the window with the Fileselector on top.

Show Console

  Toggles a console emulator on and off at the bottom of &kate;'s window. In other words, it gives you a command line within the application.

#### Keystroke Commands

Many of &kate;'s keystroke commands (shortcuts) are configurable by way of the Settings menu. By default &kate; honors the following key bindings.

Insert | Toggle between Insert and Overwrite mode. When in insert mode the editor will add any typed characters to the text and push any previously typed data to the right of the text cursor. Overwrite mode causes the entry of each character to eliminate the character immediately to the right of the text cursor.
Left Arrow | Move the cursor one character to the left
Right Arrow | Move the cursor one character to the right
Up Arrow | Move the cursor up one line
Down Arrow | Move the cursor down one line
Page Up | Move the cursor up one page
Page Down | Move the cursor down one page
Backspace | Delete the character to the left of the cursor
Home | Move the cursor to the beginning of the line
End | Move the cursor to the end of the line
Delete | Delete the character to the right of the cursor (or any selected text)
Shift Left Arrow | Mark text one character to the left
Shift Right Arrow | Mark text one character to the right
F1 | Help
Shift F1 | What's this?
Ctrl F | Find
F3 | Find again
Ctrl B | Set a Bookmark
Ctrl C | Copy the marked text to the clipboard.
Ctrl N | New document
Ctrl P | Print
Ctrl Q | Quit - close active copy of editor
Ctrl R | Replace
Ctrl S | Save your file.
Ctrl V | Paste.
Ctrl X | Delete the marked text and copy it to the clipboard.
Ctrl Z | Undo
Ctrl Shift Z | Redo

## Menu Entries

### The File Menu

Ctrl N File New

  This command starts a new document in the editing window. In the Filelist on the left the new file is named Untitled.

Ctrl O File Open

  This command does not open a file. It launches &kde;'s open file dialog box which waits for you to select the files you want to open.

  The open file dialog box works like a simple version of &konqueror;. Use your &LMB; to click on a file name to select it. Double-click on a file name to open that file. Once you've selected a file name, you can also press the OK button to open the file.

  Select multiple files by holding down the Ctrl or the Shift key along with the &LMB;. Ctrl Left click selects one file at a time. Shift Left click selects a contiguous set of files.

  Clicking on a directory name in the file selection window opens that directory and displays its contents. Clicking on a file name shows a thumbnail view of the file in the preview window to the right of the file system window.

  Use the buttons and combo box on the toolbar above the file selection window to move through the file system or to adjust the properties of the open file dialog box.

  Below the file selection window is the Location combo box. Type the name of the file you want to edit here. If you click the arrow on the right of the drop down box, you can choose from recently used files. Open several files at once by quoting each file name.

  Below the Location combo box is the Filter combo box. Enter file masks here to filter the kinds of files shown in the selection window. For example, typing the filter `*.txt` and pressing Enter will limit the display to files with a `.txt` extension. The Filter combo contains a list of your most recently used filters.

File Open Recent

  This command allows you to open a file from a submenu that contains a list of recently edited files.

Ctrl S File Save

  This command saves your file. Use it often. If the file is Untitled then Save becomes Save As.

File Save As

  Name and rename files with this command. It launches the save file dialog box. This dialog works just as the open file dialog box does. You can use it to navigate through your file system, preview existing files, or filter your file view with file masks.

  Type the name you want to give the file you are saving in the Location combo box and press the OK button.

Ctrl L File Save All

  This command saves all open files.

F5 File Reload

  Reloads the active file from disk. This command is useful if another program or process has changed the file while you have it open in &kate;

File Open with

  This command launches the open with dialog box that allows you to select another application to open the active file. Your file will still be open in &kate;.

Ctrl P File Print

  Print the active file.

Ctrl W File Close

  Close the active file with this command. If you have made unsaved changes, you will be prompted to save the file before &kate; closes it.

File Close All

  This command closes all the files you have open in &kate;.

File New Window

  Opens a another instance of &kate;. The new instance will be identical to your previous instance.

Ctrl Q File Quit

  This command closes &kate; and any files you were editing. If you have made unsaved changes to any of the files you were editing, you will be prompted to save them.

## Configuring Kate

This chapter will show you all the options for configuring &kate;.

## Credits and License

&kate; Copyright 2000, 2001, Christoph Cullmann.

Documentation copyright 2000,2001 Seth Rothberg, sethmr@bellatlantic.net

&underFDL; &underGPL;

&documentation.index;