| contents | external | ||
|---|---|---|---|
| Introduction | Contents | Site map | |
| REXX links | Details | Directory | Sources |
Kedit is a clone of XEDIT, the good old IBM mainframe editor, for DOS and OS/2 text mode (no GUI). The Windows versions KeditW are integrated into the Windows GUI, so some things are different. Almost all macros are tested with Kedit 5.00p4 for DOS and OS/2. Most macros should also work with KeditW 1.0 INTERFACE CLASSIC unless the macro header says something else, e.g. Requires: Kedit 5, OS/2 REXX. THE is another XEDIT clone for many systems (incl. Linux with Regina), and some macros might even work with THE or XEDIT. Please note that none of these macros is designed for EBCDIC, you get what you pay for... ;-)
XEDIT, Kedit, and THE all use REXX as macro language. Kedit supports its own subset KEXX and some native REXX interpreters. Most of my macros are based on KEXX. If REXX is required in older macros there should be an info in the macro header. Likewise if external tools are required it is stated in the macro header.
All kml files are Kedit Macro Libraries, plain text like kex macros, no "Keyhole Markup Language" used by Google Earth. Let's hope that my server and your browser handle these files as plain text. If this doesn't work copy the files to your disk (try Shift Enter on the desired link).
Short descriptions of most macros are simply copied from
khelp.kex. Entries
marked by
use eight-bit characters (codepage 437, 850, or 858). Entries marked
by * (asterisk) are either used explicitly as macro or
synonym replacing a Kedit command, or conflict in another
way with a KHELP manual entry. In these cases
khelp.kex offers to show the
manual entry or the context help for the macro.
| A-X.kml | (example Kedit Macro Library redefining Alt-X) | | |
|---|---|---|---|
| BASE | insert <base href="URL" /> in local XHTML copy | | |
| BINARY | edit binaries using LRECL based on window width | | |
| BOX | draw BOXes (9 styles, use keypad or box block) | ||
| CDD | CHD + CHDR like 4DOS CDD supporting *.DIR items | ||
| CDEFG | show biggest files (top 1000) in DIR.DIR file | ||
| CHANGES | CHANGE all occurences on line, not only first | | |
| CLIPS | W2K ooREXX CLIPS.REX interface using GET & PUT | | |
| CLIPS.rex | (ditto used ooREXX script, 95/98/ME not tested) | | |
| CMATCH | * | match REXX "do end" or HTML "<div> </div>" etc. | |
| COLOR | * | INITIAL.KEX calls COLOR by 'macro' monitor.1() | |
| COLOR2 | Old (1995-2005) colour scheme for younger eyes | | |
| COUNTS | COUNT string in BLOCK / ALL lines ignoring CASE | | |
| CURSORSH | * | improved CURSORSHape based on CURSORSHape auto | |
| DELIMIT | * | check and optionally patch a broken delimit() | |
| DO | * | placeholder (optional DOwn compatible synonym) | |
| DOS.kml | INITIAL.KEX loads Kedit Macro Library DOS.KML | | |
| EURO | check char.s not contained in ASCII 32..126 & 9 | ||
| EX | * | run arguments with temporarily SET LINEND ON ; | |
| EXTRACT | * | EXTRTEST clone, supports = and abbreviations | |
| FEATURES | Kedit 5.00 (D3/P3) bug list and workarounds | | |
| FMODE | * | MODify or SET FE, FM, FN, FP, FT, or FILEId | |
| HEXA | hex. editor (show and maybe even patch binary) | | |
| HEXE | (ditto squeezing 24 octets in window width 80) | | |
| HREF | convert URL (focus word) to dummy XHTML link | ||
| HTM | edit *.htm or *.html in homepage directory | | |
| INISAVE | * | INIUTIL CONVERT SETTINGS if no argument given | |
| INISET | saved INIUTIL CONVERT SETTINGS output as backup | | |
| INITIAL | * | PROFILE.KEX calls 'macro initial' if INITIAL() | |
| INITIAL.kml | (ditto used Kedit Macro Library) | | |
| KC | KCOMPARE clone (resetting special keys at exit) | | |
| KEX | Kedit macro using MACROPATH (or its definition) | | |
| KEXPAND | expand commands, needed for KHELP.KEX & KEX.KEX | | |
| KEXPATH | MACROPATH search needed for KHELP.KEX & KEX.KEX | | |
| KEYDIFF | determine all reDEFINEd (non-default) keys | | |
| KHELP | * | KHELP.KEX allows normal 'command khelp khelp' | |
| KHELPADD | KHELP.kex and xedit.htm maintenance (3 tables) | | |
| KTAGS | XTAGS clone (supporting TABs and Unix tags) | ||
| LASTKEY | * | Kedit key decoder (showing name and definition) | |
| LASTRC | * | improved QUERY LASTRC (preserves error message) | |
| LESSMORE | used as synonym for LESS TAG and MORE TAG error | ||
| LOCUS | locate target in any currently edited file | ||
| LONGEST | locate and tag longest line(s) in edited file | ||
| MONITOR | * | combines [set] MONitor and 'macro' monitor.1() | |
| MONO | INITIAL.KEX calls MONO by 'macro' monitor.1() | | |
| MSGLINE | * | explores KeditW SET MSGLINE message box effects | |
| MUSTARD | RFC 2119 keywords (MAY, MUST, SHOULD, etc.) | | |
| NBSP | convert blanks in marked block to XHTML   | | |
| NETSCAPE | view the focus URL with your favourite browser | | |
| OEMKEY.kml | overload INITIAL.KML keys with KEYB GR keys | | |
| PROFILE | * | KHELP.KEX allows normal 'command khelp profile' | |
| QX | simplified XQ.KEX integrating RELOAD.KEX | ||
| REXX | edit OS/2 script or copy REXXTRAP.CMD stuff | ||
| REXXTRAP | update REXXTRAP.CMD functions in *.CMD scripts | | |
| RING | * | DIR currently edited files TAGging modified | |
| RW | force write access on edited read-only file | ||
| RXHELP | REXX context help (OS/2, MDOS, PC DOS 7, PREXX) | | |
| STATUS | * | mini status: only relevant non-default settings | |
| TIME | * | show elapsed time for specified command | |
| TRACE | * | DEBUG manager (keys, debugging, RXTRACE, etc.) | |
| TREE | corrected sample supporting long and HPFS id.s | | |
| UNBLANK | get rid of blank lines with even line numbers | ||
| UNESCAPE | experimental: JavaScript decryption | ||
| UNIX | raw text mode based on EOLIN LF etc. settings | | |
| UTF | hex. UTF-32 or UTF-16 to hex. UTF-8 and UTF-16 | | |
| VI.cmd | NT: KeditW long file name, support associations | | |
| VI | NT: Kedit 8+3 file name given as long file name | | |
| WINDOWS | KeditW: could be called by 'macro' monitor.1() | | |
| WINHELP | * | DIR.DIR list *.HLP for KeditW command WINHELP | |
| WMSG | * | emulates KeditW 1.0 command WMSG with a DIALOG | |
| X-WIKI | Profile for text/x-wiki translates UTF-8 to NCR | | |
| XDIR | MANYFILE clone (corrected) | ||
| XHTML | Convert plain text (code page 850) to XHTML 1.0 | | |
| XLAT | Latin-1 friendly UTF-4 display of UTF-8/UTF-16 | | |
| XLAT.rex | (ditto used external REXX script) | | |
| XMLCHECK | check that XML or XHTML file is well formed XML | | |
| XTREE | DIR all subdirecories TAGging empty directories | ||
| XX | XEDIT file with name completion (DIR ambiguous) | ||
| ZIP | edit preselected files (e.g. here: ZIP manuals) | ||
| ZOO | absolute ZOne Offset navigation, e.g., binaries | | |
The following macros are contained in initial.kml and also covered by khelp.kex:
| DAY | display date + weekday, any arg.: input as line | ||
| DOSX | edit redirected standard output of OS command | ||
| LASTMSG | * | like QUERY LASTMSG, but in DIALOG (word wrap) | |
| NAME | change filename and rename a corresponding file | ||
| NEMO | start an OS/2 Norton clone in directory of file | ||
| SAY | * | display persistent result of REXX expression | |
| UNTITLED | shorthand / emulation of KeditW 'x (untitled)' | | |
| WO | locate word in any edited file (uses LOCUS.kex) | ||
| XID | x =:=\x.= or x =:=\x.y, for XID .y edit =:=\=.y | | |
Some older macros together with related OS/2 specific scripts are archived in kexxsamp.zip (22 KB) and generally not more covered by khelp.kex, exceptions are clips.kex and utf.kex:
| ANSIFY | translate ISO Latin 1 to Codepage 437 (or 850) | | |
|---|---|---|---|
| BROWSE | document browser (temporarily wrap long lines) | ||
| BROWSE.cmd | (simple OS/2 REXX script using BROWSE.KEX) | | |
| CHCP | Optionally set and get process codepage (OS/2) | | |
| CLIPS_os2.kex | OS/2 WPS clipbrd.exe interface using GET & PUT | ||
| ENV | like DOS SET, but modifying Kedit's environment | | |
| HEXE.cmd | (simple OS/2 REXX script using HEXE.KEX) | ||
| KHELP.pro | (example KHELP.PROfile mentioned elsewhere) | ||
| MBOXREF | replace In-Reply-To: by References: in mbox | | |
| MODE | OS/2: 'DOSQ MODE x,y' plus 'PSCREEN y x PRESET' | ||
| NMK | edit redirected output of NMAKE /f xyz.NMK xyz | ||
| OUTBOX.cmd | (OS/2 script: edit last Outbox message with EX) | | |
| PSCREEN.rex | initial PSCREEN size depending on any MODE CON | | |
| SETLINES | switch PSCREEN rows and columns, needs setlines | ||
| SETLINES.bat | (ditto NT emulation, does not work with KEDIT) | | |
| SUBJECT | encode CP 850 Subject: header as base-64 UTF-8 | ||
| TRASH | Netscape mailbox directory TREE (excl. *.snm) | ||
| TV | remove base64 TV (= MZ) binaries from mbox file | | |
| UTF_os2.kex | (old OS/2 UTF.KEX variant, needs external REXX) | | |
| X.cmd | (simple OS/2 REXX script: KEDIT command) | ||
| X-WIKI.cmd | (simple OS/2 REXX script using X-WIKI.KEX) | | |
| XC.rex | (REXX: edit stdout & stderr of command with EX) | | |
| XDROP.cmd | (simple OS/2 REXX script: KEDIT drag & drop) | ||
| XEDIT.cmd | (simple OS/2 REXX script: KEDIT association) | ||
| XX.cmd | (simple OS/2 REXX script using XX.KEX) | ||
Sorry, I still hadn't the time to write more about this
Kedit macro collection, but eventually got around to test
most macros with KeditW 1.0 in 2008. Please
tell me
if you are using some of this stuff, I could add a more sophisticated
version management than "Check the timestamps in the
kex directory".
For xhtml.kex see also the example, the output of xhtml.kex applied on itself. Separate manual pages exist for ktags.kex contained in ktags.zip (40 KB) and for kc.kex contained in kc.zip (50 KB).
For details about the classic REXX REXXTRAP.cmd see the REXXTRAP manual page with short entries for REXX.kex and REXXTRAP.kex, i.e. the Kedit macros REXX and REXXTRAP. However, for ooREXX this collection of portable REXX snippets is mostly obsolete.
Kedit 5.0 for DOS has some ugly limitations, e.g., at most 500 lines per macro. Because various subroutines were used almost identically in kex.kex, khelp.kex, and trace.kex these parts have been now exported into two separate macros kexpath.kex and kexpand.kex. Both can be also used directly, but their main purpose is to simplify MACROPATH searches and the expansion of abbreviated commands in other macros.
In features.kex I have noted many Kedit 5.0 features, bugs, and workarounds over the years. Some issues are fixed in KeditW 1.0 and moved to the end of features.kex. In 2008 I found the last (one hopes) Kedit oddity, it is documented in the fixed euro.kex.
If you have Kedit 5.0 get and install the last update P4 for OS/2 or D4 for DOS. In features.kex you find instructions how to patch the binaries of this version. The patches enable support for key 150 C-STAR, 55 A-STAR, and 114 S-STAR. The latter is the traditional name for AT-keyboard layouts with 84 keys, you have to press Ctrl+PrtSc on modern keyboards with 101 or more keys for S-STAR instead of Shift+Star. Maybe Mansfield forgot these keys because both the shifted and the unshifted Star of the numeric keypad simply result in * (star).
Another patch proposed in features.kex fixes an issue with the KEXX-function delimit(). Under certain circumstances this function would use *, =, ?, or ~ as delimiter, but these characters don't work as delimiter for some kinds of locate-targets. The proposed patches work also with Kedit 5.0 P3 and Kedit 5.0 D3, but a later upgrade to version P4 or D4 needs the original binaries.
Nobody is going to create a D5 or P5 service level 5 for Kedit 5.0, therefore I removed all ideas for future improvements and fixes from features.kex, and added some undocumented KeditW 1.0 features. For a short list of less esoteric features see the introduction (comments) of kexpand.kex.