ACCC Home Page ACADEMIC COMPUTING and COMMUNICATIONS CENTER
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 

KEDIT Text Editor for Windows

 

A text editor is a program that lets you create, look at and modify files. KEDIT is a very good full screen file editor for personal computers running Windows. It is patterned after IBM's XEDIT full screen editor for VM/CMS; people who are familiar with XEDIT will find it easy to get used to using KEDIT. KEDIT is a product of Mansfield Software.

 
   
 
     
Introduction to KEDIT
  You can use KEDIT on a personal computer to enter the text of an electronic note, a program or data to use with a package on your personal computer or to upload to use on the mainframe, batch files, a list of names and addresses, or anything else you want to collect together and store when using a personal computer.KEDIT has simple printing and formatting functions (for example, the KEDIT PRINT command), but you must keep in mind that KEDIT is not a word processor, which both acts as a text editor and also prepares documents for printing.

Even though word processors are text editors and then some, there is still place to use KEDIT. You can use KEDIT to look at, enter or modify any ASCII file on your personal computer's disk storage. ASCII files are text files, intended to be read and/or maintained by people rather than your machine or programs you run on it. While most word processors can be used to work with ASCII files, normally your word processing files are not saved in text format and therefore they cannot be read by people or any program that expects to be using simple text files.

Typically text files which are intended just to be read will have file names such as README or CONTENTS, and will have extentions such asTXT, HLP and DOC. Batch files, which contain a set of commands which can be executed by entering a single command, are also text files; their extention is BAT. Two important text files that you probable have and that you might someday want or need to modify areAUTOEXEC.BAT and CONFIG.SYS.

 
     
-- KEDIT Availability
  KEDIT is available for public use on all of the UIC ACCC's public MS Windows personal computers. Eligible members of the UIC community may also purchasing KEDIT from the ACCC; see Software Sales and Help for more information.  
     
-- Using KEDIT's Help System
  For additional information on using KEDIT, both introductory and detailed, see the online help menu system which comes with KEDIT. Press F1 or enter HELP on the command line in KEDIT to begin using the help system. Help is available for all items displayed between yellow arrowheads; Tab to highlight the one you are interested in and press Enter. Or enter HELP topic to view the help for a particular command or topic.

Press Escape to close a help window and return to the previous window or topic. To open a submenu from the menu bar in the KEDIT help system, hold the Alt key down while you press the highlighted character for that submenu.

 
     
-- Windows File Names and KEDIT
  Each of your files must have a unique name. Windows file names generally have two parts: the filename and the extension. To make it easier to tell which file contains which information, it is best to pick a filename and an extension which describes the contents and intended use of the file. For example, the file shown in Figure 1 is a text file containing a poem named "The Panther", thus its filename and extension arePANTHER.TXT.  
     
-- Using Home, Return, and Enter in KEDIT
  Before you begin to use KEDIT, it is important for you to know how the Return, Enter and Home keys function in KEDIT:
  • When you are entering commands on the KEDIT command line, Return and Enter function as they do in DOS and in VM/CMS's XEDIT to send the command for processing.
  • When the cursor is in the file area or prefix area in KEDIT:
    • the Return and Enter keys take you to the beginning of the next line in the file (like the VM/CMS NEWLINE key function does in XEDIT on CMS); and
    • the Home key functions as the Return and Enter keys do in VM/CMS and in XEDIT, i.e., it executes prefix commands, moves the cursor to the command line, or toggles you out of the KEDIT Input Mode and back to standard KEDIT Edit Mode.
 
     
-- "Entering" Commands in KEDIT
  KEDIT commands can be specified in three ways: from the command line, from the prefix area or by an action key:
To enter a KEDIT command on the command line
Type the command on the command line, by the ====> at the bottom of the screen (see Figure 1 ), then press Return or Enter. "KEDIT Commands" lists some important KEDIT commands.
To enter a KEDIT prefix command
Type the command in the prefix area of the line(s) that you want the command(s) to act on, and press Home to execute them. (Note that all pending prefix commands are executed when you press Home, regardless of whether they are on the currently displayed screen.) The prefix area in Figure 1 is the fields containing ===== to the left of the file area. If your KEDIT screen does not have a prefix area, you can turn one on by entering the KEDIT SET command: set prefix on
from the KEDIT command line. Some of the KEDIT prefix commands are introduced in "Prefix Commands" .
To execute a KEDIT action key
Press the appropriate key or key sequence. Some of the action keys can be pressed at any time; others require you to first move your cursor to a specific postion in the file area before you press them.

KEDIT commands can be classified according to what they do: cursor movement, scrolling, editing, blocking, text formatting, etc.

Figure 1: The KEDIT Screen in Edit Mode

 
     
-- Using Windows Cut-and-Paste and Undo in KEDIT
 

In addition to the KEDIT-specific methods of inserting and changing text described below, you can use standard Windows cut-and-paste and Undo keystrokes and functions in KEDIT, even if you're working with multiple lines. Windows cut-and-paste and Undo and the XEDIT all command -- what more could you want from a text editor?

 
     
Leaving KEDIT: FILE and QUIT Commands
 

While you work on a file in KEDIT, the copy of the file with your changes is kept only in the memory of your machine. When you finish working with the file, you must enter an KEDIT command to tell KEDIT what you want to do with it. If you are currently in input Mode, press Home to return to Edit Mode.

To save a copy of the file as it currently appears in KEDIT, and then leave KEDIT, type FILE on the KEDIT command line and press Return or Enter. KEDIT writes the new copy of the file with your changes on your disk; if there was an older version of the file already on your disk, it is discarded after KEDIT is assured that the new file is properly stored. Finally, the KEDIT screen and your displayed file disappear, and you return to DOS (or wherever you were when you entered the KEDIT command).

Note that you can also tell KEDIT to save the current copy of the file without leaving KEDIT; in this case, type the KEDIT command SAVE on the KEDIT command line and press Return or Enter.

To leave KEDIT without saving any changes you may have made to the file you are working on, press F3 (it does not matter where on the screen your cursor is when you press F3). If you have not made any changes to the file, the KEDIT screen clears, and you return to DOS. But if you have made changes, KEDIT displays the message:

Error 22: File has been changed - QQUIT to quit anyway
If you really do want to leave without storing the copy of the file you have been working on, type QQUIT on the KEDIT command line and press Return or Enter. If you decide you do want to keep the changes, and store the new version of the file on your disk, type FILE on the command line and press Return or Enter.
 
     
Adding Data to a File
 

Using F2 action key to add a single line:

To add a single line to a file, move your cursor to anywhere on the line above where you want to add the line, and press F2. Then type the line. Press Return or Enter when you are finished typing the line. F2 action key to add a long line:

Using KEDIT's Input Mode to add a group of lines:

To use Input Mode, the following SET option must be selected:

SET INPUTMODE FULL

And if you want KEDIT to break the lines you enter at a convenient inter-word blank, you will also need to have the margins set appropriately and WORDWRAP set ON.

Once these options are set, on the KEDIT command line, type INPUT and then press Return or Enter. KEDIT will go into Input Mode. In Input Mode, the prefix areas (=====) and message line disappear, and the command line contains " Input Mode". The bottom half of the screen clears, and becomes the Input Zone. You cannot enter any KEDIT commands when you are in Input Mode, and you can not type on the command line.

You will enter your lines in the Input Zone. The Input Zone is located between the current line and the line following it, so to input after a particular line in an existing file, make it the current line before you enter the INPUT command (see "Selecting a Current Line" ).

When you enter Input Mode, your cursor is placed automatically at the beginning of the first line in the Input Zone. Begin typing the first line of your text here. When you complete typing a line, you may force KEDIT to allow you to begin typing on the next line in the file, by pressing Return or Enter. Or if WORDWRAP is ON and if you have appropriate margins set, you can just type, without regard to the end of a line, and KEDIT will generate a line break itself at a blank between two words.

If you are allowing KEDIT to wrap the lines for you, it will scroll the screen up one line each time it generates a line break for you. If you are breaking your own lines, when you reach the bottom of the screen and press Return or Enter, the lines you have typed move to the top of the screen and a new Input Zone is created for you to type in.

When you finish typing the text you are entering, press Home. This takes you out of Input Mode and back into Edit Mode (see "Edit Mode: Modifying Existing Lines in a File" ).

 
     
 Edit Mode: Modifying Existing Lines in a File
  Now what about the spelling errors, the lines you have left out, the paragraph you want to move? Make these changes in Edit Mode.  
     
-- Making Changes in the File Area
  In Edit Mode, you can directly edit the lines of your file which are displayed in the file area. Some of the ways to make changes the text of the file, are:
Typing over mistakes
Use the arrow keys, UP, DOWN, RIGHT and LEFT, or any of the other cursor moving keys listed in the KEDIT help (press F1 while using KEDIT) to move the cursor to the incorrect word and type the correction over it.
Delete
If necessary, you can press Delete to delete the character the cursor is on; the rest of the line moves over to the left to fill in.
Insert
Or you can use Insert to enter additional characters to a line: press Insert to toggle into Insert mode; the cursor will change from a blinking underscore to a blinking solid box. Once in Insert mode, whatever you type is inserted at the cursor position and the rest of the line, beginning with the character under the cursor, moves to the right to make room. Press Insert again to toggle back out of Insert mode.
 
     
-- Moving Around in Your File
 

Moving from screen to screen:

What happens when your file is too large to display on one screen? There are several ways to move around in your file. The easiest way to move from screen to screen in your file is to press:  

PgUp
to scroll backward one screen in the file
PgDn
to scroll forward by one screen
Ctrl-PgUp
to move current line to "Top of File" line
Ctrl-PgDn
to move current line to the line above the "End of File" line

It does not matter where your cursor is on the screen when you press these action keys.

Finding a particular location in the file:

When you want to find a particular place in your file, the KEDIT LOCATE command allows you to move to the next occurrence of a given string. LOCATE is an KEDIT command, so type the command on the KEDIT command line and press Return or Enter. Say for example, you want to find the string " Dear Mom".
Type:  /dear mom/
on the command line and press Return or Enter. By default, LOCATE in KEDIT ignores the case of its "targets", so this will find "dear mom", "Dear Mom", or, for that matter, "Dear MOM".

KEDIT searches from the current line toward the End of File, and moves to your current line to the first occurrence of "dear mom", regardless of its case. If it does not find the string, it displays the error message:

    Error 17: Target not found
on the message line, and leaves the current line unchanged.

There are many additional ways to use the LOCATE command that you will learn as you become more familiar with KEDIT.  

Splitting and joining lines:

When you are editing in the file area, you might either want to break a line into two, or join two short lines into one.  

Split a line
Move your cursor to the line that you want to split, and position the cursor at the character at which you want the line split (the character at the cursor will be the first character in the newly split line), then press F11 or Alt-S (that is, hold down the Alt key while you press either upper or lower case S). The cursor remains where it was before the line was split, so that you can add text to the line.
Join adjacent lines
You can also join a line with the following line. Position your cursor at or beyond the end of the line (that is, in the blanks after the end of the text on the line), at the place you want the beginning of the following line to be positioned, and press F11 or Alt-J. (Again, this means to hold down the Alt key while you press either upper or lower case J.) The cursor position does not change. The following line file moves up to "join" the line, with its first character at the cursor position.
 
     
--Prefix Commands
  KEDIT provides a group of line oriented prefix commands which allow you to add, delete, move or copy a line or a block of lines. These commands are typed in the prefix area (=====) of the line(s) you are working with; press Home, not Return or Enter, to execute the KEDIT prefix commands. If your KEDIT screen does not display a prefix area, turn it on by typing SET PREFIX ON on the command line and pressing Return or Enter.

The basic KEDIT prefix commands are:

/ (set current line)
Type / anywhere in the prefix area of the line you want to be your current line, and press Home. This line becomes your current line, displayed just above the scale in the center of your screen, and your cursor
A (Add line)
Type A in the prefix area of a line and press Home to add one blank line below this line; or use A n to add "n" lines.
D (Delete line)
Type D in the prefix area of a line and press Home to delete this line; or use will move to the first column of this line. D n to delete "n" lines; or type DD in the prefix area of the first and last lines in a range of lines to be deleted.
C (Copy line)
Use Copy with F (Following) or P (Previous) to indicate where you want the copy located. Type C in the prefix area of the line you want to copy. Then move to the position in the file that you want to copy the line to, and either type F in the prefix area of the line above the copy's position or type P in the prefix area of the line below the copy's position, and press Home. This adds a copy of the line at the new position, without changing the original line. Or use C n with F or P to copy "n" lines; or type CC in the prefix area of the first and last lines in a range of lines to be copied, with F or P to indicate the copy's position.
M (Move line)
Move acts as a Copy and then Delete the original line(s); use Move with F (Following) or P (Previous) to indicate where you want it moved. Type M in the prefix area of the line you want to move. Then move to the position in the file that you want to move the line to, either type F in the prefix area of the line above the new position or type P in the prefix area of the line below the new position, and press Home. This moves the line to the new position, and deletes it from its original location. Use M n with F or P to move "n" lines; or type MM in the prefix area of the first and last lines in a range of lines to be moved, with F or P to indicate the new position.
 
     
-- The KEDIT Action Keys and Blocks
  There are KEDIT action keys which execute each of functions introduced in "Prefix Commands" , and there are other ways to define and use blocks in KEDIT. See the HELP which comes with KEDIT, by pressing F1 while you are using KEDIT.  
     
-- Selecting a Current Line
  To make a specific line the current line, you can use:
The XEDIT LOCATE command and XEDIT targets
These are introduced in "Moving Around in Your File" .
The / prefix command
Type the KEDIT prefix command / (see "Prefix Commands" ) in the prefix area of that line and press Home.
The KEDIT action key F5
Move your cursor to anywhere on the line that you want to be your current line and press F5.
 
     
KEDIT Commands
  The following are KEDIT commands. KEDIT commands must be entered on the KEDIT command line (beside the ====> at the bottom of the screen). If your cursor is in the file area, press Home to execute any pending prefix commands and return to the command line. Then type the command on the command line and press Return or Enter.

The portions of the following command syntaxes which are enclosed in square brackets ([ and ]) are optional. The slashes ("/") below are used as string delimiters; the delimiters are required, but you can use any non-blank character (not included in the string!) as the delimiter instead of the slash. Many of the commands have additional options. Finally, the part of the command name given in uppercase letters is the minimum abbreviation for the command.

Command
Function
ALL /string /
select all lines containing 'string' for selective editing; for example, ALL /Panther/
Bottom
(or press Ctrl-PgDn) move current line to the End of File line
Change /string1/string2/
change 'string1' to 'string2' in current line; for example, C /Panther/Canary/
DELete [n]
delete n lines, beginning with current line, 1 is the default for n; for example, DEL 3
DIR [filespec ...]
Place a directory listing into DIR.DIR file and display it, see the online KEDIT help for more information; for example, DIR *.*
DOS [command]
enter DOS or execute the (optional) DOS command specified; for example, DOS DELETE junk.txt
Down [n]
move current line down n lines, 1 is the default; for example, D 20
FILE [filespec]
write the current file to disk (with the optionally specified pathname, " filespec" and leave KEDIT
[Locate] /string/
find first occurrence of 'string'; the command name LOCATE is optional when you use / as delimiters for the search string; for example, L ?Panther? or /Panther/
PRint [target] [n]
print text in target area with a formfeed after every n lines; for example, to print the entire file, press Ctrl-PgUp to to move to the top of the file, and then enter PRINT * 50 to print the entire file, 50 lines per page
QQuit
leave KEDIT, without saving the changes which have been made in the file
Query parameter
show current value of the specified SET parameter (ARBCHAR, BACKUP, CASE, COLOR, FPATH, INPUTMODE, KEYBOARD, MARGINS, MONITOR, RANGE, SHADOW, TABS, WORDWRAP and ZONE); for example, Q CASE
QUIT
leave KEDIT when no changes have been made to file during session
RECover [n]
put above the current line the last n lines deleted with DELETE; for example, REC 3
RESET
clear all commands from the prefix area
SAVE [filespec]
write the current file to disk (with the optionally specified pathname, filespec) but do not leave KEDIT
[SET] parameter
give value to SET parameter (ARBCHAR, BACKUP, CASE, COLOR, FPATH, INPUTMODE, KEYBOARD, MARGINS, MONITOR, RANGE, SHADOW, TABS, WORDWRAP and ZONE); for example, SET CASE MIXED IGNORE
TOP
(or press Ctrl-PgUp) move current line to Top of File line
Up [n]
move current line up n lines in file, n defaults
/string/
find first occurrence of 'string' beginning with current line; note in this case you must use the slash as the delimiter; for example, /Panther/
:linenum
move current line to specified line number (an "absolute" line number); for example, :34
[+]n
move current line down n lines; for example, 20
-n
move current line up n lines; for example, -20
 


2000-9-29  document@uic.edu
UIC Home Page Search UIC Pages Contact UIC