Here is a summary of the changes in KEDIT for Windows 1.6. All of the changes discussed here are also included in KEDIT for Windows 1.6.1. (Version 1.6.1 fixes a bug that prevented KEDIT's DOS command from working on Windows 8, but otherwise adds no new features to KEDIT beyond those described here.)
Changes for Windows Vista, 7, 8, 8.1, and 10
Many of the changes in KEDIT for Windows 1.6 were made to help KEDIT run better under Windows Vista. While Vista was the motivation for these changes, they all also apply to Windows 7, Windows 8, Windows 8.1, and Windows 10. Most of them also affect KEDIT when running under earlier versions of Windows, so everyone upgrading to KEDIT for Windows 1.6 should review them:
KEDIT had been using a very old install program that did not run well under Vista, and did not run at all on 64-bit versions of Windows. KEDIT's new install program has been built with NSIS (Nullsoft Scriptable Install System).
Previous versions of KEDIT kept your saved settings in a file called KEDITW.INI in the Windows directory. Because of Vista's User Account Control (UAC) security features, developer guidelines for Vista discourage writing to the Windows directory. So KEDIT now uses the registry instead.
You don't need to take any action because of this change. If you are upgrading from a previous version of KEDIT for Windows, KEDIT for Windows 1.6 will automatically copy your saved settings from the KEDITW.INI file to the registry the first time that it is run.
Utility commands are available to extract saved settings from the registry so that you can move them to new computers.
KEDIT for Windows 1.6 uses the registry to store your settings on all versions of Windows, not just on Windows Vista.
In previous versions of KEDIT, the USER subdirectory of the KEDIT program directory (normally C:\Program Files\KEDITW) was the recommended location for user-written macros. KEDIT still looks there for macros, but with Vista's UAC feature, administrative privileges are required to write to the Program Files directory.
So the new preferred directory for user-written macros, automatically searched along with the install directory's USER subdirectory, is the "KEDIT Macros" subdirectory of your "My Documents" folder (known as the "Documents" folder in Vista).
When KEDIT starts up, it has normally had the KEDIT program directory, C:\Program Files\KEDITW, as its current directory, and that was the path used for the UNTITLED.1 file opened when KEDIT started.
Since Vista's UAC feature normally prevents KEDIT from saving files to that directory, and since it was never a particularly useful default directory to save in the first place, KEDIT now uses the "My Documents" folder (known as the "Documents" folder in Vista) as its initial directory.
(What KEDIT actually does here is look, at start up, to see if the current directory is the same directory as the directory KEDITW32.EXE was loaded from; only in this case does KEDIT switch to "My Documents". So if you want KEDIT to start up in a different directory, you can still change the Properties of the shortcut that you use to start KEDIT to specify that KEDIT start in that other directory.)
Without a separate download from Microsoft, the older Windows Help format can no longer be used with Vista. So the Help file has been converted from the older Windows Help format to the newer HTML Help format.
KEDIT for Windows 1.6 also includes the full text of the KEDIT User's Guide and the KEDIT Reference Manual, in PDF format.
Some adjustments to KEDIT's appearance have been made to fit in better with Vista (and XP). In particular, on Vista KEDIT uses the standard Vista font (called MS Segoe UI) for dialog boxes and for things like the text of the status line. On XP, KEDIT uses the XP-standard Tahoma font for these items. The most noticeable effect of this change is that, if the Windows ClearType feature is enabled on your system, these fonts look much better than the Sans Serif font that was previously used.
For the actual text of your files, KEDIT now uses the Courier New font, because it also benefits from Windows' ClearType feature, instead of the previous Courier font.
If you are upgrading from a previous version of KEDIT for Windows and your screen font is still set to the old default of Courier, then the first time that you run KEDIT for Windows 1.6, it will reset your font to the new default of Courier New. You can control the font that is used with KEDIT's Options Screen Font... menu item.
Current PCs have much larger amounts of memory and are much faster than the PCs of 1996, when KEDIT for Windows 1.5 was originally released. To take account of this, we've raised many of KEDIT's internal limits.
|Feature||Old Limit||New Limit|
|Files in the ring||100 files||500 files|
|Lines per KEXX macro||4000 lines||No limit|
|Length of line in KEXX macro||250 characters||1024 characters|
|Minimum WIDTH setting||512 characters||1024 characters|
|Default WIDTH setting||1024 characters||10000 characters|
|Maximum WIDTH setting||32000 characters||999999 characters|
|SORT command fields||10 fields||50 fields|
|SET COLMARK column markers||20 column markers||50 column markers|
|SET PATH/MACROPATH setting||300 characters||1000 characters|
|SET SYNONYM||100 synonyms||1000 synonyms|
|SET TABS columns||32 columns||100 columns|
|SET VERIFY operands||10 column pairs||25 column pairs|
|String expressions in search
(LOCATE /a/ | /b/ ...)
|12 expressions||50 expressions|
|ARBCHARs in string expression|
|16 ARBCHARs||50 ARBCHARs|
|Default undoable actions
(Configurable via SET UNDOING)
|100 actions per file||200 actions per file|
|Default memory for undo data
(Configurable via SET UNDOING)
|64K per file||512K per file|
|KEXX NUMERIC DIGITS||50 digits||1000 digits|
|.KLD file :MATCH section||40 lines||200 lines|
|Recently-used filenames saved
(SET RECENTFILES controls how
many show up on the file menu;
default is 9)
|16 filenames||25 filenames|
|Command lines saved
(Recallable via F6, Shift+Cursor Up/Down)
|40 command lines||100 command lines|
|Other saved operands
(Find/Replace, DIALOG, etc.)
|16 saved operands||25 saved operands|
KEDIT for Windows 1.6 includes minor improvements to some of KEDIT's other commands and features. The most widely useful are probably the first two listed here: color printing for syntax-colored text, and the ability to widen the prefix area to display line numbers larger than 99999. There have also been a number of internal changes to KEDIT, both to improve performance and to fix bugs reported since the last maintenance release of the program.
When printing to a color printer, KEDIT will now print syntax-colored text in color. The colors involved can be controlled by the new SET PCOLOR command, which takes the same operands as SET ECOLOR (which controls how syntax-colored text is displayed on your screen). This feature is active when SET PRINTCOLORING ON, which is the default value for the new PRINTCOLORING setting, is in effect.
"SET PREFIXWIDTH n" controls the width of the prefix area. The prefix area was previously always 5 characters wide, and now can be up to 9 characters wide.
This option is useful if you use NUMBER ON in connection with PREFIX ON or PREFIX NULLS to display line numbers within the files you are editing and you want to be able to display line numbers larger than 99999, which is the largest that will fit in the default 5-character width of the prefix area.
The REGUTIL command, which does exactly the same thing as the existing INIUTIL command, has been added; REGUTIL is now the preferred name.
Similarly, SET REGSAVE and NOREG are now the preferred names for SET INISAVE and for the NOINI initialization option.
REGUTIL BACKUP CONFIG|HISTORY
has been added. It adds files called KEDIT.Config.reg or KEDIT.History.reg to the KEDIT ring, containing a copy (for CONFIG) of the KEDIT configuration settings saved in the registry or (for HISTORY) of recent command lines, files edited, etc. from the registry.
can use these to transfer your KEDIT settings and/or history to a new computer by saving this .REG file to disk, copying it to your new computer, and double-clicking on it to install it in the registry of the new computer.
REGUTIL GET CONFIG|HISTORY section name
has also been added. Only valid from within macros, it reads a value from KEDIT's section of the registry, and returns it to you as the value of a KEXX variable.
A new command, HISTUTIL, allows you to access the contents of the history lists (recent commands, recently-edited files, etc.) maintained by KEDIT:
HISTUTIL INFO type
HISTUTIL CLEAR MEMORY|REGISTRY type|ALL
HISTUTIL GET MEMORY|REGISTRY type
HISTUTIL RELOAD type|ALL
HISTUTIL SAVE type|ALL
With the DOS, DOSQUIET, and WINEXEC WAIT commands (but not DOSNOWAIT and WINEXEC NOWAIT), a macro can now test the 32-bit exit code from the command that was run, which is returned to the macro as the value of a KEXX variable.
The limit on the number of lines in the :MATCH section of a .KLD file has been raised from 40 to 200.
Syntax coloring for C# files has been added. CSHARP.KLD is built into KEDIT and is automatically used to color .CS files.
In support of this, a new operand for the :STRING section of .KLD files, VERBATIM, has been added. It is used by CSHARP.KLD to handle verbatim strings. These are special C# strings that begin with an @ character in which backslash characters don't serve as escape characters, allowing strings like @"C:\Windows\System32" instead of "C:\\Windows\\System32".
You can now specify in the :IDENTIFIER section of a .KLD file that identifiers that aren't keywords be displayed in a special color. To do this, add the word ALTERNATE followed by a number from 1 to 9 that specifies the ECOLOR to be used to for identifiers. For example:
[a-zA-Z_] [a-zA-Z0-9_] ALTERNATE 2
Here, ALTERNATE 2 has been added to the usual specification for C identifiers. This will cause C identifiers that are not keywords to be displayed in the color specified by ECOLOR 2.
An optional second number, also in the range 0 to 9, controls the color used to display preprocessor identifiers that aren't keywords:
[a-zA-Z_] [a-zA-Z0-9_] ALTERNATE 2 3
KEDIT normally keeps track of :MATCH items nested to a depth of 15. You can now specify DEEPNESTING in the :OPTION section of a .KLD file to cause nesting to be tracked to a depth of 255.
In the :STRING section of .KLD files a new option, NOTAFTER [class], can be specified as the last option on the line. It means that quote characters don't "count" as the start of a string if they appear immediately after one of the characters in the specified class. For example:
single notafter [a-zA-Z]
would prevent the first three quote characters here from being taken as the start of a string:
a' + b' = c' 'only this is a string'
NOTAFTER can also be used in the :COMMENT section of a .KLD file with LINE comments that use the ANY operand. For example,
:COMMENT line % any notafter [*]would prevent the first line below from being taken as a comment:
*% This one is not a comment.
% This one is a comment.
SET TABSAVE is a specialized command that deals with an issue affecting a small number of KEDIT users:
KEDIT's TABSIN/TABSOUT processing can sometimes lead an "unchanged" line to be written back to disk differently than when it was read in - existing tabs can be replaced with spaces, or vice versa. Some version control systems undesirably see these all as "changed" lines.
SET TABSAVE ON avoids this by checking to see whether the current line is subject to the problem and, if so, by saving an exact copy of the character sequence of the original line. Later, when the file is saved, when an "unchanged" line is written back to disk, we don't write our normal version of the line out, but instead write back the saved exact original version of the line.
SET HELPDIR is a specialized command for users who cannot access the KEDIT Help file because KEDIT is installed on a network drive.
KEDIT's Help file, KEDITW.CHM, is in HTML Help format and is normally installed in the KEDIT program directory. Because of a Microsoft security fix issued in 2005, HTML Help files stored on a network drive don't work without special changes to the registry. If your copy of KEDIT is installed on a network drive, you can copy KEDITW.CHM to a local directory and use SET HELPDIR to tell KEDIT where it is.
A second operand, whose value can be TRAILING (the default) or NOTRAILING, has been added to SET WORD. It controls whether, when you mark words (usually done by double-clicking on them), trailing blanks following the word are or are not also marked. Previously, KEDIT always included trailing blanks when marking words, and this is the behavior you still get with the default value of TRAILING.
The operands for the LINE and COLUMN initialization options can now be enclosed in quotes. For example,
KEDITW32 ABC.TXT (LINE 12
KEDITW32 ABC.TXT (LINE "12"
are now both accepted.
The functionality of the Window Arrange dialog box could previously not be accessed through a KEDIT command. Now it can be, via:
WINdow ARRANGE (Horizontally|Vertically)
The READV and EXTRACT /LASTKEY/ commands have been enhanced.
Except under Windows 98 and Windows Me, the READV command now returns READV.5, and EXTRACT /LASTKEY/ now returns LASTKEY.5, with information similar to what it contained in text mode KEDIT about the status of the CapsLock, NumLock, ScrollLock, and the left and right Alt and Ctrl keys.
Except under Windows 98 and Windows ME, the seventh and eighth characters returned via READV.4 and LASTKEY.4 are now set to 0 or 1, the seventh character depending on whether the left shift key is up or down, and the eight character depending on the right shift key. (Previously, both of these characters were 1 if either shift key was down).
READV.4 (returned by READV KEY) and LASTKEY.4 (returned by EXTRACT /LASTKEY/) were always setting characters 2, 3, and 4 of the result to 0; these characters are now correctly set to 0 or 1 depending on the state of CapsLock, NumLock, and ScrollLock.
Query/EXTract RING takes a new optional operand, FILEID.
Query/EXTract RING FILEID gives the fileids of each of the files in the ring, in mixed case. (For historical reasons, Query/EXTract RING without this new operand gives the fileid in mixed case, and includes additional information which can make it hard to parse fileids that contain blanks.)
KEXX macros can now start with a REXX-style comment in line 1.
/* This is a REXX-style comment */
(Previously, in the DOS and OS/2 versions of KEDIT, REXX-style comments at the start of a macro signalled that the macro should be processed by REXX and not by KEXX. KEDIT for Windows processes all macros with KEXX.)
MODIFY DIRECTORY now causes KEDIT to place on the command line a CHDIR command that you can then edit to change the current directory. (Consistent with the general rules for the MODIFY command, MODIFY DIRECTORY previously placed a SET DIRECTORY command on the command line, even though there is no SET DIRECTORY command and CHDIR is its closest equivalent.)
Within macros, EXTRACT /LINE/ has always returned the line number of the focus line in LINE.1. It now also returns the line number of the current line in LINE.2; this is also accessible as LINE.2().
The new EXTRACT /WINDOWNAME/ command tells you the name of the current document window, which may include the window numbers displayed in the title bar when a file is displayed in multiple windows.
The SHOWDLG command lets you initiate the display of KEDIT's built-in dialog boxes from a macro or from the command line. SHOWDLG SETCOMMAND displays the Options/SET Command... dialog box. What is new is that you can now optionally control which SET option is initially displayed in the dialog box.
ANSIDATATYPE() is a new KEXX function. It works in exactly the same way as the more-commonly-used DATATYPE() function, except that the A, L, M, and U options assume that string uses the ANSI character set and they treat all alphabetic characters, including accented letters with character codes above 127, as alphabetic. DATATYPE(), on the other hand, treats only the 26 characters of the English alphabet as alphabetic.