home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- THE ZURI EDITOR
- Version 3.2
- (June 29, 1986)
-
-
-
-
- This program is made available "as is", without any warranties,
- explicit or implied, as to performance, merchantability, or fitness for
- any particular purpose, whether or not a contribution is made. It has been
- put in the public domain. It is advisable to thoroughly test this program
- before using it seriously. It can be freely copied and distributed
- provided no charge is made.
- If you find this program of use, a contribution of $15 would be
- appreciated. In return, I will inform you of any changes, fixes,
- additions, etc. If you supply a standard DOS 2.0 double sided double
- density 5 1/4 " diskette in a self-adressed, stamped mailer along with the
- $15, I will also send you the latest version of the editor along with its
- documented source code (in TURBO PASCAL), so that modifications can be
- made at will.
- J. Donald Monk
- 2135 Goddard Place
- Boulder, Colorado 80303
-
- Memory requirement: 190K. With this memory, the maximum editable file
- is 32K. Each additional 32K memory adds that much to the maximum editable
- file, up to the maximum 640K giving a possible file size of 480K. In any
- case, no file is allowed to have more than 9999 lines.
-
- System requirement, other limitations: I do not know the limits. In
- developing it, I have used an IBM PC with 640K memory, varying sized
- virtual disks, monochrome display, Epson FX100 printer, DOS 2.0. I have
- not used it with tree directories, piping, etc.
-
- NOTE: The editor cannot handle a file that has lines longer than 225
- characters, and also fouls up if characters with ascii 7,8,10,13,26 are in
- the file (except to indicate end of line or end of file).
-
- ERROR PROTECTION: Generally speaking, there is enough error
- protection so that the editor will not crash during normal use. In most
- cases an error will be indicated at the bottom of the screen. In some
- cases, an error will simply be ignored, and nothing visible will happen.
-
- WARNING: As of this date, the editor has not been used very much, so
- there may be unexpected things happening.
-
-
-
-
-
-
-
-
-
-
-
-
-
- TABLE OF CONTENTS
- Summary of Commands...............................................3
- Editing Commands..................................................4
- Current memory line...............................................4
- Going to a new line...............................................6
- Other commands....................................................7
- Changing defaults................................................10
-
- TO START THE EDITOR, TYPE
-
- zuri <enter>
-
- For this, the file zuri.com should be on the drive being used. There
- are other files, which are not absolutely essential, but may be of
- use:
- zuri.hle - a help file
- zuri.doc - this documentation
- zuri.key - a file of user-defined macros (see below)
- zuri.my - a file of user modifications (see below)
- zuriinst.com - a file to "install" the editor, so as to be able to
- use DOS from within it
-
- ESSENTIAL INFORMATION
-
- To start zuri, type zuri <enter> Then you will be asked for a file
- name, and, in general you can start editing at once, since there is a help
- screen.
-
- **************************************************************************
- * SUMMARY OF EDITING COMMANDS *
- * Page*
- * Backspace : delete character to the left of cursor, go left.......5 *
- * Del : delete character at cursor, pull characters in........5 *
- * Ins : toggle between insert/ overwrite modes (insert = fat cursor)...5 *
- * Cursor Left : move cursor left one character........................5 *
- * Cursor Right : move cursor right one character.......................5 *
- * Tab : move cursor to next tab stop..........................5 *
- * Ctrl CursorLeft : move cursor left in steps of 20....................5 *
- * Ctrl CursorRight : move cursor right in steps of 20.................5 *
- * Home : move cursor to the beginning of current memory line...5 *
- * End : move cursor to the end of the current memory line.....5 *
- * alt a : enter a (special) ascii character.....................5 *
- * alt f : forget changes on current memory line.................6 *
- * TEXT MACROS : ......................................................6 *
- * ENTER : split line, or create blank line......................7 *
- * CursorUp : go to the same column in the screen line above........7 *
- * CursorDown : go to the same column in the screen line below........7 *
- * alt 1 : go to top of screen, in same column...................7 *
- * alt 2 : go to middle of screen, in same column................7 *
- * alt 3 : go to bottom of screen, in same column................7 *
- * PgUp : go to previous screen full............................7 *
- * PgDn : go to next screen full................................7 *
- * Ctrl PgUp : scroll back continuously..............................7 *
- * Ctrl PgDn : scroll forward continuously...........................7 *
- * Ctrl Home : go to beginning of the file...........................7 *
- * Ctrl End : go to the end of the file.............................7 *
- * alt b : block commands (copy, move, delete)...................7 *
- * alt d : delete a memory line..................................8 *
- * alt g : display last filename saved to........................8 *
- * alt h : display a help file...................................8 *
- * alt i : set up automatic indenting............................8 *
- * alt j : concatenate two memory lines..........................8 *
- * alt k : shift lines to the right or left......................8 *
- * alt l : list specified memory lines...........................8 *
- * alt n : repeat previous search................................8 *
- * alt o : go to DOS (must be installed).........................9 *
- * alt p : change wrap limit.....................................9 *
- * alt q : search for a string...................................9 *
- * alt r : replace one string by another........................10 *
- * alt s : save the file to disk................................10 *
- * alt u : display the actual file size.........................10 *
- * alt v : toggle word wrap, not at end of file.................10 *
- * alt w : toggle word wrap, at end of file.....................10 *
- * alt x : exit editor..........................................10 *
- * alt y : save part of the file................................11 *
- * alt z : insert a file........................................11 *
- **************************************************************************
-
- NOTE: It does not matter whether, for example, alt a or alt A is pressed.
-
- EDITING COMMANDS
- The screen has a window of 75 columns by 21 lines, where the file
- being edited is displayed, in part. Left of this window are line numbers,
- not present in the file itself, and a vertical border. Line 22 displays a
- double line, to form a border. Line 23 displays informational messages:
- the name of the old file, or an indication that it is a new file; the file
- size, in lines and bytes, and the total file size allowed with the given
- memory available (virtual disks are excluded in counting this memory); an
- indication of the wrap number (see below), or an indication that wrap is
- off (both of these are only indicators for when one is working at the end
- of a file); and an indicator of the column on the screen line that the
- cursor is on (it can vary from 1 to 75). Screen lines 24 and 25 are used
- for interaction with the editor. Text entered here in response to the
- editor's requests can be edited a little bit: the cursor left and right
- keys, backspace, and del keys as well as the usual letters and symbols are
- available for use here.
- The byte count will be about the same as that in the diskette file at
- first, but after editing awhile it may exceed that; it is lengthy to give
- the rules for this, so the byte size information should be used for a
- rough idea only. On the other hand, the line size information is always
- accurate. To get the exact number of bytes which will be written out to a
- file, use the command alt u (see below).
-
- One can start with an old file, or a new one; the initial messages
- indicate how to make this choice. WORD WRAP is automatically set at
- column 65, but the limit changed can be changed (see below). Also, it is
- set ON for work at the end of the file, and OFF otherwise. Both of these
- defaults can be changed (see alt-v, alt-w). The word wrap works as
- follows: when typing beyond the limit, say column 65, the first space
- (blank) which is typed will cause a line break; both a new blank memory
- line, and the corresponding screen line, will be input, exactly at the
- blank (which disappears). The wrap limit can be set to anything up to 225.
- It is possible that during editing, the cursor can be beyond the
- actual end of the memory line. If an ordinary character key, or a macro,
- is pressed while this is true, the editor will act as if the space beyond
- the former end of the current line is filled with blanks. Otherwise there
- are no characters between the end of the memory line and the cursor
- position.
- The main part of the editor can be divided into three kinds of
- activity: (1) working on a memory line - the CURRENT MEMORY LINE (2) GOING
- TO A NEW MEMORY LINE, and (3) OTHER COMMANDS.
-
-
-
- CURRENT MEMORY LINE
-
-
-
- At a given time in the editing process, the cursor is on a certain
- screen line, which is associated with part of a file memory line. As the
- displayed memory line is edited, the file memory line is not changed. The
- current memory line is stored temporarily in a string variable curline,
- which is modified continuously during editing. The associated file memory
- line is changed - updated - only when the current memory line is left for
- some purpose, the most frequent of which is to go to a new file memory
- line.
- Ordinary letters, digits, and special characters are entered in the
- usual way. By default they are inserted before the letter where the cursor
- is, but this can be changed with the Ins key; see below. This insert mode
- is indicated with a fat cursor; the overwrite mode is indicated on the
- display with the ordinary cursor. Special keys for the current memory line
- are as follows:
-
- BACKSPACE: This works in the usual way: the cursor goes back one, and
- erases the character there, bringing in any other characters, if any, from
- the right. It works on the memory line: if at the far left of a screen
- line which is not the beginning of the memory line, it goes to the right
- of the screen line above.
-
- DEL: This also works as usual: deletes the character at the cursor,
- pulling in from the right the remaining characters, if any, in both the
- memory and screen lines. If DEL is used when part of the memory line is
- below the screen, all of the memory line will be pulled up, scrolling
- other screen lines up.
-
- INS: This toggles from the insert mode (fat cursor) to the overwrite mode
- (ordinary cursor) or vice versa.
-
- ARROW POINTING LEFT: takes cursor one column to the left. As a special
- case, the cursor goes from column 1 of a screen line to column 75 of the
- line above if not at the beginning of a memory line.
-
- ARROW POINTING RIGHT: similar to arrow pointing left. The cursor is not
- allowed to go beyond the screen line containing the last part of the
- current memory line, however.
-
- TAB (On the left, under Esc key, on the standard keyboard): goes to the
- next tab stop. If beyond the end of the current line, or if TAB takes you
- beyond, the intervening space is filled with blanks. The default tab stops
- are set at columns 5, 10, 15, . . ., 225. To have different tabs, they
- should be put on a single line in a file named zuri.tab on the same drive
- as the zuri programs. The single line should have the format
-
- t1 t2 t3 t4 . . . ti
-
- where t1, t2, t3, . . . are the tabs in increasing order, each positive
- and less than 226. The number of tabs is at most 45, but the line can be
- as long as 180 characters.
-
- Ctrl cursorLeft : takes the cursor left in steps of 20, otherwise acting
- like cursorleft.
-
- Ctrl cursorRight : takes the cursor right in steps of 20, otherwise
- acting like cursorRight.
-
- End : the cursor goes to the very end of the current memory line.
-
- Home : the cursor goes to the beginning of the current memory line.
-
- alt a : This puts the editor in the interactive mode, with the cursor on
- screen line 24. Give the integer which is the ascii code of a character,
- and it will be entered appropriately in memory and on the screen, at the
- position where the cursor was before pressing alt a. Note: the control
- characters with ascii codes 7,8,10,13,26 cause trouble for the editor.
-
- alt f : FORGET: when editing a memory line, this is a "forget changes"
- command - on the screen and in the storage curline, all changes made on
- the memory line from the time the cursor most recently came to this memory
- line are forgotten. After leaving a memory line, changes can no longer be
- forgotten.
-
- TEXT MACROS: It is possible to define special keys for often used
- sequences of characters; these macros can be used in the file being
- edited, or within an interactive response, but cannot be used to specify a
- sequence of commands to the editor. The specifications for the special
- keys are put on a special file named zuri.key, on the same drive as the
- other zuri programs, in the following format: second code, macro, second
- code, macro, . . . . (one line for second code, then a line for the macro,
- etc.). Here the "second code" refers to the extended ascii code (see the
- IBM basic manual, appendix G). The keys available are the function keys
- F1-F40, and the macros may be up to 75 characters each. The function keys
- F1-F10 have second code 59-68; Shift- F1-F10 have second code 84-93; Ctrl-
- F1-F10 have second code 94-103; and Alt- F1-F10 have second code 104-113.
- Example: Let the file zuri.key contain the following four lines:
-
- 59
- Boulder, Colorado
- 94
- It is a cold day, but it is supposed to warm up tomorrow.
-
- THEN when in the editor, pressing F1 will produce
-
- Boulder, Colorado
-
- in the file being edited (it will be inserted if in the insert mode, while
- it will overwrite if in the overwrite mode - see below) and pressing ctrl
- F1 will produce
-
- It is a cold day, but it is supposed to warm up tomorrow.
-
- If macros are not wanted, then it is not necessary to have the file
- zuri.key at all. If the format of the file zuri.key is not correct, the
- editor will abort when it tries to load it. Since loading zuri.key is the
- first thing that the editor tries to do, this does not waste much time.
- If several macros are available for a given key, the FIRST such will be
- the one taken.
-
-
- GOING TO A NEW LINE
-
-
-
- When going to a new line, the current line is saved, except as
- indicated below. It is actually put in a new place in memory, and the old
- line is not deleted, although it is no longer accessible to the user. This
- creates "garbage", and the byte count, which counts both the old and the
- new line, becomes inaccurate.
-
- ENTER : This key, also called carriage return, is used in several ways.
- Basically, if in the middle of a memory line, pressing enter will cause
- the first part of the current memory line, up to the symbol before the
- cursor, to remain there, while the last part, including the symbol where
- the cursor was, goes to a new memory line created following the current
- one. The cursor goes to the beginning of the second of the two memory
- lines formed in this way, unless automatic indenting is set (see below).
- The first one is put in the file memory, but not the second. There are
- important special cases: if the cursor is at the first current memory line
- position, an empty line is created preceding the current memory line. If
- the cursor is at the end of the current memory line, a new line is created
- following the current memory line. This last case is the way that brand
- new text is created. If the cursor is beyond the end of the current memory
- line, which can happen, the space between the end and the cursor is filled
- with blanks before the new line is formed.
-
- ARROW POINTING UP : goes to the same column of the screen line above;
- scrolls screen if initially on the first screen line.
-
- ARROW POINTING DOWN : similar to arrow pointing up.
-
- alt 1 : go to the top of the screen, keeping the cursor in the same
- column.
-
- alt 2 : go to the middle of the screen, keeping the cursor in the same
- column.
-
- alt 3 : go to the bottom of the screen, keeping the cursor in the same
- column.
-
- PgUp : goes to the previous page of text, with some overlap. The cursor
- goes to the top of the new page, in the same column it started in.
-
- PgDn : goes to the next page of text, with some overlap. The cursor goes
- to the bottom of the new page, in the same column it started in.
-
- Ctrl PgUp : Scroll back continuously. Can be stopped by pressing any key,
- and then normal editing can continue. If the beginning of the file is
- reached, of course this procedure stops, and line 1 is ready to be edited.
-
- Ctrl PgDn : Similar to Ctrl PgUp, but scrolling forward. It the end of
- the file is reached, the last line of the file is ready to be edited.
-
- Ctrl Home : editing goes back to the beginning of the file, with the
- cursor in the upper left.
-
- Ctrl End : editing goes to the end (last 15 screen lines) of the file.
- The cursor goes to the very end of the last memory line in the file. Thus
- if one wants to add to a given file, the procedure is to load it, press
- the ctrl end keys, then press ENTER, and you are ready to go.
-
-
-
- OTHER COMMANDS
-
-
- alt b : BLOCK COMMANDS: A block is defined by the user, and then one of
- three commands can be done on the block: copy it to another place, delete
- it, or move it to another place (destroying the old copy). When alt b is
- pressed, you will be presented with a small menu on screen lines 24 and
- 25:
- b : mark block beginning - if <b> is pressed, the beginning of the
- block will be set at the cursor, and will be displayed in reverse video
- (black on white).
- e : mark block end - if <e> is pressed, the end of the block will be
- set at the cursor, and will be displayed in blinking reverse video. If the
- end of the block is a blank, it will not blink. If the cursor is beyond
- the end of the current memory line, special things apply when doing the
- operations below.
- y : display block beginning - if <y> is pressed, the beginning of the
- block, as previously defined, will be displayed in reverse video, with the
- cursor there. If the beginning was not defined, nothing will happen.
- z : display block end, similarly.
- c : copy the block to just before the cursor position. If it is a pure
- line block, starting at the beginning of a line and ending beyond the end
- of a line, with the cursor at the beginning of another line, you have the
- choice of making several copies.
- d : delete the block.
- m : move the block to just before the cursor position, destroying the
- old block.
- NOTE: After setting up a block, any changes made on one of the lines
- where the block is located will unset the block. Also, moving, copying, or
- deleting will unset the block.
-
- alt d : DELETES the memory line, and associated screen lines, determined
- by where the cursor is. The cursor goes to the beginning of the next
- memory line, or, if the last memory line in the file was the one deleted,
- to the previous line. The line is not actually removed from memory, but it
- becomes inaccessable to users, and will not be present when the file is
- written to a disk. So for most practical purposes it is deleted. The byte
- count remains the same, however.
-
- alt g : Displays name of the last file saved to, or indicates that the
- stuff being edited has not yet been saved.
-
- alt h : A help screen is displayed. It uses the file zuri.hle, which
- should be on the default drive.
-
- alt i : AUTOINDENT. Interactively, one has the following choices: indent
- the same amount the preceding line is indented, or indent a fixed amount.
- At the start of editing, there is no automatic indenting. To return to no
- automatic indenting, use alt i to set automatic indenting to 0.
-
- alt j : JOINS. When this key combination is pressed, the memory line
- below the current memory line is pulled up to the current one, with a
- space character between them, and the cursor goes to the beginning of the
- concatenated line.
-
- alt k : User is prompted for 3 integers, i,j,k. Lines i through j are
- shifted to the right k units. The ends may be shifted off. k negative
- means to shift to the left.
-
- alt l : Display on the screen starting at a prompted line number.
-
- alt n : REPEAT PREVIOUS SEARCH. If there was a previous search, it is
- repeated, starting from the line the last search was on. If the last
- search went to the very end, the new search starts over at line 1. If
- there was not a previous search, nothing happens. Also, if the previous
- search was at a line that is now beyond the end of the file, because of
- deletions, nothing happens.
-
- alt o : GO TO DOS. When this key combination is pressed, the editor is
- temporarily left, and control goes back to DOS, where any programs at all
- can be run, if there is enough memory. When ready to return to exactly the
- same place in the editor, type
-
- exit <enter>
-
- Command.com must be on drive a: to use this command. Also, the command has
- to be installed, in the following way. When using zuri on a disk, also
- load the file zuriinst.com. Type
-
- zuriinst <enter>
-
- then follow the instructions, which ask you how you want memory split up
- between the editor and DOS for this command. After the command is
- installed, it does not need to be reinstalled for this disk, and the file
- zuriinst.com can be deleted.
- Various programs give the editor trouble with this command. The user
- should test out his favorite listers, spoolers, etc with this command and
- see which ones really work. Some of them will work better if DOS is given
- more memory with zuriinst as above. Others still won't work (this has been
- my experience).
-
- alt p : CHANGES THE WRAP LIMIT; user prompted for the new wrap limit,
- which can be any integer < 301, although all integers > 224 have the
- effect of no wrap limit (= wrap off). Afterwards, the cursor returns to
- its previous position, and editing can continue.
-
- alt q : SEARCHES FOR A STRING. User is prompted for the number of the
- memory line at which to begin the search, and for the search string, which
- may be up to 75 characters long. Also, the user has the option whether to
- ignore uppercase/lowercase distinctions (in both the stuff in memory and
- the search string simultaneously), and whether to search in the forward or
- backward direction. After each "find", user is prompted whether to
- continue or not. After the search is finished, the editor stops over the
- string found, or if no strings were found, goes back to the beginning of
- the file.
-
- alt r : REPLACES ONE STRING BY ANOTHER. The user is prompted for six
- things: starting memory line, ending memory line, whether to be prompted
- for go-ahead or not at each occurrence of the first string, whether to
- ignore the uppercase/lowercase distinction in the old string, and finally,
- the two strings. To replace in a backwards direction, simply make the
- ending memory line less than the starting memory line. The string which is
- to be replaced must be non-empty; otherwise, the editor will keep waiting
- until a non-empty one is entered. After the procedure is finished, a list
- of the lines in which replacements were made is given on lines 24 and 25;
- only the last 20 replacements are given if there were more than 20.
- Finally, after a key is pressed, the editor goes back to the beginning of
- the file. If the result of replacing a line is exactly the same as the old
- line, the replacement procedure will terminate. Note that it is quite
- possible to exceed the current file limit with this command, even if the
- the size of the file when written out on a disk does not exceed it. This
- is because each changed line is stored in a new place in memory, with the
- old (inaccessible) line still taking up space. If the current limit is
- exceeded, because of such garbage or otherwise, the editor will then stop
- and allow the user to decide what to do. One possibility is to exit the
- editor, saving the file, and then read it back in, thereby getting rid of
- the garbage.
-
- alt s : SAVES the file being edited. Prompts for file name. If the file
- already exists, you will be asked whether you want to overwrite it
- (destroy the old file, and put the new one in its place). There is no
- automatic back-up for the file being edited, so you should save often
- enough, with a new file name of your own choosing, to protect your work
- from machine errors, interruptions, etc. After saving, the editor returns
- to the current line being edited, with the cursor in the same position as
- before the command was given. The current memory line IS saved before this
- operation. The disk associated with the file name is checked to make sure
- that enough space is available for the given file (using the real byte
- count available to the user in the command alt u). If it does not have
- room, an error message is given and the user can try again with a
- different drive, or decide not to save the file.
-
- alt u : displays the real size of the file being edited if it is written
- to a disk. This is useful in many cases, since the displayed byte count on
- line 23 is not very accurate.
-
- alt v : TOGGLES WORD WRAP on to off, off to on, for work not at the end
- of the file.
-
- alt w : TOGGLES WORD WRAP on to off, off to on, for work at the end
- of the file.
-
- alt x : EXITS the editor. Will give a prompt for saving the file being
- edited or not.
-
- alt y : SAVE part of the file. The segment of lines given by the current
- block is saved to a file of user's choice.
-
- alt z : INSERT a file before a given line. Note: a big file will take
- quite a while to be inserted.
-
- CHANGING DEFAULTS
-
-
- A limited number of defaults can be changed by putting any one or more
- of the following lines in a file named zuri.my:
-
- automatic indenting
- wrap off
- wrap at i
- overwrite
-
- These should be lower case. i is an integer. "Automatic indenting" means
- that each line will be indented the same as the previous line when using
- the enter key. The default is insert, and "overwrite" changes that to
- overwrite.
- With this file on the zuri disk, the indicated choices become the
- defaults (which can still be changed while editing, if desired).