Novell is now a part of Micro Focus

Kate: Cool Tips and Tricks II

Novell Cool Solutions: Feature
By Scott M. Morris

Digg This - Slashdot This

Posted: 8 Sep 2005

Applies to:

  • Platforms using KDE

Previously, I wrote a bit about some of the neat features of Kate, a nice text editor for KDE. We looked at the tabs down the left side. We also looked at splitting the editor pane. Used in conjunction, these are useful features. However, there are many others to consider.

For example, another of the great things that Kate offers is that it supports a wide myriad of keyboard shortcuts. If you are editing multiple documents, pressing CTRL+L will save them all. If you are on a line that you want to delete, CTRL+K will delete one entire line. If you like to see line numbers in your document, F11 will toggle those on or off for you.

Once in a while, I like to have my text files automatically wrapped at 80 columns. So, if I type a word that goes past this, it gets put onto the next line. However, sometimes I need to go back to a paragraph and add or remove words. This will mess up the wrapping. What can I do in this case to fix the word wrapping? If you are in Kate, and this happens to you, just press CTRL+J. This will rewrap your lines for you.

If you have multiple documents open, you can switch between them by pressing ALT+LEFT ARROW or ALT+RIGHT ARROW. ALT + the left arrow moves the selection up one entry. ALT + the right arrow moves the selection down one entry.

Under certain circumstances, you may want to maximize on the real estate provided by your monitor. CTRL+SHIFT+F makes Kate go into "Full Screen Mode", expanding to fill the entire screen. This gives you quite a noticeable amount of space to work. This is true especially if you are splitting your editing panes and working with multiple text files.

These are the main keyboard shortcuts that I use. Hopefully, I've been able to show some that you will find useful.

Many programmers will appreciate the 'code folding' support found in Kate. When working with large source code files, it's sure nice to fold the code. It makes it quite a bit easier to manage and browse through the code.

Kate provides a fair amount of wrapping support. Kate can do hard wrapping or soft wrapping. Hard wrapping is where Kate actually inserts a newline character into the text, forcing the rest of the text onto the next line. The end of the line of text is hard coded, so to speak. Soft wrapping is where Kate wraps the line, but just displays the rest of the text on the next line, even though there isn't a newline character inserted. The difference here is that once something is hard wrapped, it will stay that way. Soft wrapping will change with the width of the window, and can be turned completely off. It also does not alter the text of the document.

Depending on your needs, these features are nice to keep in mind. Personally, I like to keep my hands on the keyboard when possible. This allows me to work faster. For this reason, I am glad that Kate provides such rich keyboard shortcut support. Depending on the type of document or source code that I am editing, the wrapping features are quite helpful, as well.

Again, we have taken a few more of the features that Kate gives us and have looked at them in some detail. Look for another article on more of these rich features in the future. There are still quite a bunch more to cover.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates