Level: Global
Dialog box: None
Save Settings handling: Not savable
Use SET AUTOCOLOR to determine the syntax coloring parser used for files with a specified extension.
When the default of COLORING ON AUTO is in effect for a file, KEDIT decides which parser to use for that file by examining the file's extension. If SET AUTOCOLOR has been used to specify a parser for that extension, KEDIT uses that parser to control syntax coloring for the file. The NULL parser, which does no syntax coloring, is used whenever a file has an extension for which no parser has been specified.
For example, the command
SET AUTOCOLOR .LNG LANGtells KEDIT to use the LANG parser (which must already have been defined via the SET PARSER command) for files with an extension of .LNG.
Parsers referred to in SET AUTOCOLOR commands must already be defined, either by being built into KEDIT or via the SET PARSER command.
SET AUTOCOLOR is automatically put into effect for the following extensions during KEDIT initialization:
| Extension | Parser |
|---|---|
| .BAS | BASIC |
| .FRM | BASIC |
| .C | C |
| .COB | COBOL |
| .COBOL | COBOL |
| .CBL | COBOL |
| .CPP | C |
| .CXX | C |
| .DLG | RESOURCE |
| .FOR | FORTRAN |
| .FORTRAN | FORTRAN |
| .F90 | FORTRAN |
| .F | FORTRAN |
| .H | C |
| .HPP | C |
| .HXX | C |
| .HTM | HTML |
| .HTML | HTML |
| .INI | INI |
| .JAV | JAVA |
| .JAVA | JAVA |
| .KEX | REXX |
| .KML | REXX |
| .REX | REXX |
| .KLD | KLD |
| .PAS | PASCAL |
| .DPR | PASCAL |
| .PRG | XBASE |
| .RC | RESOURCE |
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
SET AUTOEXIT determines whether KEDIT automatically exits when the last file in the ring is closed.
With the default of AUTOEXIT OFF, KEDIT keeps running even if there are no files in the ring and all of its document windows have been closed. You can then begin editing other files, or you can use File Exit to close KEDIT's frame window and end your editing session.
With AUTOEXIT ON, your editing session ends whenever the last file is removed from the ring. Some KEDIT users prefer this behavior, because it is more like the behavior of text mode KEDIT and because it saves the extra step of closing KEDIT's frame window to exit KEDIT after closing the last file in the ring.
Level: File
Dialog box: Options SET Command
Save Settings handling: Not savable
When syntax coloring is active, KEDIT uses different colors to highlight different types of text. Syntax coloring is controlled by a language-specific parser. The parser scans the text in your file, decides which characters are parts of keywords, comments, strings, etc., and displays the text in the appropriate color; the specific colors used are determined by the SET ECOLOR command.
Syntax coloring parsers for several languages are built into KEDIT, and you can use KEDIT Language Definition files in connection with the SET PARSER command to load your own parser definitions.
The first operand to SET COLORING turns syntax coloring ON or OFF for the current file. When COLORING OFF is in effect, your file is displayed without syntax coloring. When COLORING ON is in effect, your file is displayed using the colors determined by the parser that you specify.
The second SET COLORING operand determines the parser to use for the current file:
With the AUTO operand, KEDIT uses a parser that is determined by the extension of the file you are editing. The parser that is used for a given extension is controlled via the SET AUTOCOLOR command.
If no parser is defined for a particular extension, KEDIT uses the NULL parser, which is a special dummy parser that doesn't actually apply any syntax coloring.
The parser operand gives the name of the language-specific parser to use. You can choose one of the parsers that is built into KEDIT or you can use a parser of your own that you have loaded via the SET PARSER command. Here are the parsers that are built into KEDIT:
| Parser | Used With |
|---|---|
| C | C and C++ programs |
| REXX | KEXX and REXX programs |
| HTML | HTML documents |
| JAVA | Java programs |
| COBOL | COBOL programs |
| FORTRAN | FORTRAN programs |
| PASCAL | Pascal and Delphi programs |
| KLD | the KEDIT Language Definition files described in Chapter 8, ``KEDIT Language Definition Files'' |
| INI | INI files |
| BASIC | BASIC programs |
| XBASE | xBase programs |
| RESOURCE | the RC and DLG files used in Windows program development |
| NULL | dummy parser that doesn't actually apply syntax coloring |
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
The first two operands control the amount of space set aside in DIR.DIR files for file names and for file extensions. To accommodate long filenames, you can use the SET DIRFORMAT command to have KEDIT set aside more columns for file names and for file extensions (i.e. everything after the last period in a fileid). By default, the 32-bit version of KEDIT sets aside 30 columns in DIR.DIR files for filenames and 10 columns for file extensions. The 16-bit version of KEDIT, which does not support long filenames, uses 8 characters for file names and 3 characters for file extensions.
As a special case, you can specify 0 as the value for file extensions. This causes KEDIT to display the name and extension together as a unit in the columns normally set aside for the file name.
The third operand of SET DIRFORMAT controls the number of digits used to display the year in DIR.DIR files. It can be set to either 2 (the default, which yields two-digit years, such as 96 or 97, in DIR.DIR listings) or 4 (which yields four-digit years, such as 1996 or 2000).
SET DIRFORMAT does not have any effect on a DIR.DIR file that you have already created; it only affects subsequent DIR commands. So you should use SET DIRFORMAT before issuing a DIR command whose output you want to affect.
Level: File
Dialog box: Options SET Command
Save Settings handling: Savable
When syntax coloring, enabled via the SET COLORING command, is active, KEDIT uses different colors to highlight different types of text. KEDIT includes a simple parser for each language with syntax coloring support. The parser scans the text in your file, decides which characters are parts of keywords, comments, strings, etc. and based on this decides which of 35 emphasis types, referred to by the letters A through Z and the numbers 1 through 9, to use for those characters. For example, numbers used in most programming languages are given emphasis type C, which is by default shown in dark red.
Here are the emphasis colors that KEDIT uses by default when MONITOR WINDOWS is in effect:
| Letter | Color | Language Element |
|---|---|---|
| A | dark green | comments |
| B | dark cyan | strings |
| C | dark red | numbers |
| D | blue | keywords |
| E | dark red | labels |
| F | dark red | preprocessor keywords |
| G | red | header lines |
| H | black | extra right paren, matchable keyword |
| I | blue | level 1 paren |
| J | blue | level 1 matchable keywords |
| K | dark red | level 1 matchable preprocessor keywords |
| L | dark green | level 2 paren, matchable keyword |
| M | red | level 3 paren, matchable keyword |
| N | dark cyan | level 4 paren, matchable keyword |
| O | dark magenta | level 5 paren, matchable keyword |
| P | gray | level 6 paren, matchable keyword |
| Q | dark blue | level 7 paren, matchable keyword |
| R | magenta | level 8 or higher paren, matchable keyword |
| S | magenta | incomplete strings |
| T | blue | HTML markup tags |
| U | red | HTML character and entity references |
| V -- Z | black | not currently used |
| 1 | red | alternate keyword color 1 |
| 2 | dark blue | alternate keyword color 2 |
| 3 | dark red | alternate keyword color 3 |
| 4 | dark magenta | alternate keyword color 4 |
| 5 | dark green | alternate keyword color 5 |
| 6 | dark cyan | alternate keyword color 6 |
| 7 | red | alternate keyword color 7 |
| 8 | black | alternate keyword color 8 |
| 9 | blue | alternate keyword color 9 |
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
SET FCASE controls whether KEDIT handles all fileids internally in lowercase or keeps them in mixed case, as is necessary to create and preserve the mixed case fileids available under Windows 95/98/NT/2000/Me/XP. SET FCASE is available only in the 32-bit version of KEDIT; the 16-bit version of KEDIT handles all fileids in lowercase.
With the default of FCASE ASIS (``as is''), KEDIT displays filenames in the same case (upper, lower, or mixed) that the names have on disk, and creates new files using exactly the combination of upper- and lowercase characters that you specify. An exception comes within DIR.DIR files, where names that are in lowercase or mixed case are displayed as is, but names that are in uppercase are displayed in lowercase, since this is generally easier to read.
With FCASE LOWER, KEDIT displays all filenames in lowercase in DIR.DIR files and on the ID line, and in uppercase on the title bar. New files are created with lowercase names, regardless of the case in which you enter the name.
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
Level: View
Dialog box: Options SET Command
Save Settings handling: Savable
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
Tells KEDIT to search for macros in each of the directories specified via the PATH variable in the system environment.
Tells KEDIT not to do a path search for macros. KEDIT will look for macros only in memory and in the current directory.
Tells KEDIT to do a path search for macros, with the list of directories to search found in the environment variable envvar. Directories in the list are separated from each other by a semicolon, in the format that is traditionally used with the DOS PATH= environment variable.
Dirlist is a string with a list of semi-colon-delimited directories. It can also contain entries that begin with an asterisk, to indicate an indirect reference to an environment variable. ``='' is also allowed, causing a search of the directory of the current file. For example,
SET MACROPATH C:\TEMP;E:\SOURCE;*INCLUDE;=
means search the C:\TEMP and E:\SOURCE directories, then the directories listed in the INCLUDE environment variable, and then the directory of the current file.
In order for the value of MACROPATH to affect KEDIT's initial search for your profile, it needs to be set in an earlier KEDIT session and then saved to KEDIT's INI file via the Options Save Settings dialog box. You can also specify MACROPATH as a KEDIT initialization option, and if you do so its value will override the value in KEDIT's INI file.
When searching for macros, .KML files, .BMP files, and .KLD files, KEDIT proceeds as follows: If a specific drive and/or directory is specified, KEDIT looks only there. Otherwise, KEDIT looks first in the current directory, next does a path search, as controlled by SET MACROPATH, and next looks in the directory from which the KEDIT module was loaded and in its USER and SAMPLES subdirectories. The search ends successfully as soon as KEDIT finds the file it is looking for, and ends in failure if the file cannot be located.
We normally recommend that macros that you create be kept in the USER subdirectory of the directory where the KEDIT module is stored.
Level: Global
Dialog box: None
Save Settings handling: Not savable
The syntax coloring facility depends on language-specific parameter files, known as KLD (KEDIT Language Definition) files, to determine which text to display as comments, strings, keywords, etc. Use the SET PARSER command to define a syntax coloring parser and load its associated KLD file.
Use the parser operand to specify the name of the parser you want to define.
The fileid operand specifies a file, with a default extension of .KLD, containing your language definition. The format of these KEDIT Language Definition files is discussed in Chapter 8, ``KEDIT Language Definition Files''. KEDIT searches for the .KLD file in the same directories it uses when searching for macro files, as controlled by SET MACROPATH.
For example, if you were working with a hypothetical language called LANG and you had described the language in a KEDIT Language Definition file called LANGDEF.KLD, you could define a parser called LANG with the command
SET PARSER LANG LANGDEF.KLDAfter issuing the SET PARSER command, you could then issue the command
SET COLORING ON LANGto use this parser to control syntax coloring for the current file.
If files in your language always had an extension of, for example, .LNG, you could use the SET AUTOCOLOR command to tell KEDIT to always use the LANG parser for .LNG files:
SET AUTOCOLOR .LNG LANGSET PARSER commands are typically executed from your KEDIT profile when KEDIT is initially loaded. For example:
* if first profile execution in a session,
* setup the LANG parser and then
* cause all .LNG files to be colored using the LANG parser
if initial() then do
'set parser lang langdef.kld'
'set autocolor .lng lang'
end
Several language definitions are built into KEDIT, and when KEDIT
is loaded it automatically issues SET PARSER commands that use these
language definitions to set up its default parsers. To distinguish
these internal language definition files from actual disk files, KEDIT
uses an asterisk as the first character of their names. For example,
the command
SET PARSER C *C.KLDtells KEDIT to use *C.KLD as the Language Definition File associated with the C parser. The asterisk in the name tells KEDIT to use the special file *C.KLD, which is built into KEDIT, and not to look for the file on disk.
The following parser definitions are automatically put into effect at KEDIT initialization:
| Parser | File |
|---|---|
| BASIC | *BASIC.KLD |
| C | *C.KLD |
| COBOL | *COBOL.KLD |
| FORTRAN | *FORTRAN.KLD |
| HTML | *HTML.KLD |
| JAVA | *JAVA.KLD |
| INI | *INI.KLD |
| KLD | *KLD.KLD |
| PASCAL | *PASCAL.KLD |
| REXX | *REXX.KLD |
| RESOURCE | *RESOURCE.KLD |
| XBASE | *XBASE.KLD |
| NULL | *NULL.KLD |
If you want your own KLD file to be used in place of one of KEDIT's built-in KLD files, you can use a SET PARSER command that specifies the appropriate parser name along with your KLD file. For example
SET PARSER C NEWC.KLDwould use your NEWC.KLD file in place of the built-in *C.KLD file.
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
KEDIT looks for your file in each of the directories specified via the PATH environment variable.
Tells KEDIT not to do a PATH search for your file. KEDIT will look for the file only in the current directory.
Tells KEDIT to do a path search for files, with the list of directories to search found in the environment variable envvar. Directories in the list are separated from each other by a semicolon, in the format that is traditionally used with the DOS PATH= environment variable.
Dirlist is a string with a list of semi-colon-delimited directories. It can also contain entries that begin with an asterisk, to indicate an indirect reference to an environment variable. ``='' is also allowed, causing a search of the directory of the current file. For example,
SET PATH C:\TEMP;E:\SOURCE;*PATH;=
means search the C:\TEMP and E:\SOURCE directories, then the directories listed in the PATH environment variable, and then the directory of the current file.
In order for the value of PATH to affect KEDIT's search for files added to the ring at the start of a KEDIT session, it needs to be set in an earlier KEDIT session and then saved to KEDIT's INI file via the Options Save Settings dialog box. You can also specify PATH as a KEDIT initialization option, and if you do so its value will override the value in KEDIT's INI file.
When searching for files to be edited, KEDIT proceeds as follows: If a specific drive and/or directory is specified, KEDIT looks only there. Otherwise, KEDIT looks first in the current directory, then does a path search controlled by SET PATH, and then looks in the directory from which KEDIT was loaded and in the USER and SAMPLES subdirectories of that directory. The search ends successfully as soon as KEDIT finds the file it is looking for; if the file cannot be located, KEDIT assumes you want to edit a new file with the specified name in the current directory.
The default value of *PATH;*INCLUDE;= tells KEDIT that its path search should involve looking in each of the directories listed in the PATH environment variable and the INCLUDE environment variable and then in the directory of the current file.
Level: Global
Dialog box: Options SET Command
Save Settings handling: Savable
SET PRINTPROFILE lets you change the name of the profile executed when the Windows Explorer invokes KEDIT to print an associated file.
You can use the Windows Explorer to specify that KEDIT will be the application used to print files with certain extensions. Once a file extension has been associated with KEDIT, you can select a file with that extension in the Windows Explorer and choose Print from the button 2 context menu to have the file printed by KEDIT. You can also have KEDIT print the file by dragging the file within the Windows Explorer to your default printer icon.
When the Windows Explorer uses KEDIT to print a file, KEDIT is invoked with a command like
KEDITW32 /P fileidWhen KEDIT sees /P as its first parameter it takes this a signal to run the profile specified via the SET PRINTPROFILE option, instead of your normal profile. This special profile should contain commands to print your file and then exit from KEDIT. An appropriate default profile, PRINTPROFILE, is built into KEDIT, so most KEDIT users will not need to change the value of the PRINTPROFILE option.
Level: View
Dialog box: Options SET Command
Save Settings handling: Savable
There is also a new form of the SET TABS command that lets you specify a set of specific tab columns and then specify that tabs will be set every n columns thereafter. For example:
TABS 1 10 16 30 40 INCR 5This sets columns 1, 10, 16, 30, and 40, then columns 45, 50 55, 60, etc. as tab columns.