Kon - The PM Text Editor with Power

By: Walter Metcalf
Date: 10/27/99

Text editors are very personal creatures. Many heated arguments have taken place in defence of editors whose principal advantage is that they have long served the one doing the defending. In many ways this is only natural; editors are a tool and serve their purpose best if they are "invisible". Once a person has gotten used to an editor so he or she can use it and scarcely think about it, that person is often loathe to change.

So the purpose of this article is not to persuade you to change from that beloved editor you have used for years. However, Kon 
by Bjorn Andersson is not as well-known as it deserves to be, and I would like to make you aware of the speed, power and flexibility of a fine editor you may not have known about before.

The description of Kon, as given by the author on its Web site, as "a shareware PM text editor with hex-editing capabilities" is actually quite understated. Kon has such a powerful array of features, that it can be used as a programmers editor, provided the programming demands are not too great. Moreover, compared to most programming editors, Kon is very fast and light, a real bonus in many situations.

However, before we get into looking at the features in detail, let's look at Kon's overall look and feel and how it operates. Kon has no installation program, but as the author points out, there is no need for one. To install, simply unzip the archive into a directory, and then add that directory to the PATH statement in your CONFIG.SYS file. Then use the pop-up menu on the Kon.exe file to create a Program Object somewhere on the Desktop.

Starting up Kon will show a fairly conventional-looking menu. The bulk of Kon's vast array of features can be accessed from this menu. Many features can also be accessed using hotkeys; these hotkeys can be edited or deleted, and you can add your own by editing the file standard.kbd located in the main Kon directory. Most of the configuration of options such as word-wrap, margins, tabs, fonts, etc. are accomplished using the notebook which is displayed by clicking on the "Settings" menu item. This notebook contains a large number of options, each of which can be deselected, selected or set to a specific value. These values are permanently saved in Kon's INI file.

There is a final way of changing certain features in Kon. These features include Language Support, Syntax Highlighting and Keyboard Configuration (including keyboard macros). To change any of these, you must edit the appropriate existing file (or in the case of language support, for example, download the correct language file from the Kon web site (or create a file for your language), place it in Kon's directory, and then select its name on the "Language" tab in the Settings Notebook.) Here is a partial list of Kon's other features:

  • Built-in hex editor. Switchable between ASCII and hex anytime.
  • Search & replace across multiple files.
  • Configurable tab key.
  • LF only linebreaks option. (Doesn't convert to CR+LF).
  • Configurable syntax highlighting. (C, C++, IPF, HTML, LaTex, Ada 95 and Haskell support built in)
  • Configurable keys. (Borland/Wordstar by default).
  • Escape & Regular expressions.
  • Macro support. (keystroke recording and language)
  • Undo/redo on all editor functions with configurable buffer size.
  • Multi-threaded operation.
  • Column block.
  • Programmable Word-wrap.
  • Prints to printer or file.
  • Opens up to 25 files in separate windows.
Few OS/2 PM editors have this all of this functionality. Let us look in more detail at some of these features:
  1. Built-in Hex editor

    • Some text editors' hex feature is limited to the ability to load the file in hex instead of ASCII. With Kon, the hex feature is available throughout. When activated, the text is displayed with the character positions on the left, the hex in the middle, and the ASCII text on the right. In addition, there is provision for being able to search on hex characters. A really nice touch is a pop-up conversion chart showing every character's ASCII display and its decimal and hexadecimal values. With Kon you'll never again have to search around for a manual with an ASCII conversion chart.

  2. Search & replace across multiple files.

    1. This is one of those functions that you may not need very often, but when you do, there is absolutely no substitute for it. This feature (called Files/Buffers in the menus) can be used across files, directories or even across drives! You have the option of operating directly on the hard drive, or of preloading the files into buffers and then operating on them in memory. Not only is the latter faster but it can also be undone.

    2. One application where this can be particularly usefully is in the maintenance of Web sites. Usually Web sites consist of multiple files, and they must be updated periodically; often this means all or a group of these files must be changed at once -- for example when an email address or product name changes.

Next week we'll complete our review of this unusual editor by looking at the remainder of the selected features, including macros, printing and word-wrapping.

Walter Metcalf

Nex week: Kon - The PM Text Editor with Power, Part 2

Unless otherwise noted, all content on this site is Copyright © 2004, VOICE