Using Kate
Starting | Windows |
Changing Fonts |
Highlighting | Line Numbers |
Indenting | Keyboard
Shortcuts | Shell Shortcuts
- Kate is an easy-to-use WYSIWYG text editor that has many features
useful for programming.
- When the editor starts, you may see a window displaying a tip. Click
the Close button.
- The window may be too small. Click the Maximize button to make the
editor full screen.
- Kate has a title bar that displays the name of the current document, a
menu bar, and a standard toolbar of buttons.
- The buttons from left to right are New, Open, Back, Forward, Save, Save
As, Stop, Undo, Redo, Cut, Copy, Paste, Find, Increase/Decrease Font
Size, Split Vertically, Split Horizontally, Close Current, Print.
- The left column lists all of the open files (file list), or allows you
to find and open a file (selector).
- To switch between the file list and the selector, click the tab above
the column.
- The bottom window contains a shell prompt.
- If you do not see a shell prompt, click Settings, Tool Views, Show
Terminal.
- The top window allows you to type and edit text.
- To increase the size of the editor window, move to the bottom until you
see double arrows and drag downwards.
- If the text is difficult to read, you can change the font as follows:
- Click Settings, Configure Kate.
- Click Editor and click Fonts.
- Scroll down to Courier 10 Pitch. (Courier is a monospace font that is
useful for programming.)
- Select a larger size, e.g. 14.
- If you save your file with a .java extension, the Java code will be
colour-coded.
- Objects are blue, keywords are black and bold, comments are grey and
italic, data types are brown, string literals are red, characters are
pink, etc.
- To view a description of highlights, click Settings, Configure Kate,
Editor, Highlighting.
- To put the editor into Java mode immediately (before saving), click
Tools, Highlight Mode, Sources, Java.
- To view line numbers, click View, Show Line Numbers or press F11.
- To indent you can either use spaces or tabs. By default, the tab key
indents 8 spaces.
- To change the number of spaces a tab indents, click Settings, Configure
Kate.
- Click Editor, click Editing, and change "Tab and indent width" to 3.
- This will only change how it appears in the editor, since tab
characters are stored in the file.
- If you want the tab key to insert 3 spaces, check "Replace tabs with
spaces."
Avoid using the mouse because it slows you down. Many common keyboard
shortcuts work in a number of programs including Kate.
- Use Ctrl-S to save, Ctrl-O to open, and Ctrl-N for a new file.
- Use Ctrl-X to cut, Ctrl-C to copy, Ctrl-V to paste.
- Use Ctrl-Z to undo, Ctrl-Y to redo.
- Use the arrow keys, Home, End, Page Up and Page Down to move the cursor.
- Use Shift while moving the cursor to select text, or press Ctrl-A to
select all text.
- Press the up and down arrow keys to cycle through recently used shell
commands.
- Edit a previous command using Home, End, Backspace, Delete and left and
right arrow keys.
- Press the Tab key to complete the name of a file so you do not have to
type the full name.