Category : Word Processors
Archive   : ICHI.ZIP
Filename : ICHI.MNL
Angeles area Computer Swap Meets for the price of $5.00. It is also available
in the IBM software application forum of Compuserv. If you use this program and
find it thoroughly useful and to your complete satisfaction, you are asked to
send an additional $20.00 to the author, Fook H. Eng, c/o Computer ERA, Inc,
428-B South Ramona Ave, Monterey Park, CA 91754, to support his effort in such
creativities. In return, your name will be on file for purpose of notification
of updates and support. Complete source code, for an additional $10.00, will
be provided so that you may modify the program to suit your own biases and
needs. A $5.00 handling fee for each major update is required. Minor updates
and blatant bug fixes are free. You are encouraged to make copies of the
program and pass them on to your friends. If you come by this program as such
a recipient, you are also encouraged to subsidize the author's well being
subject to the same condition of being satisfied with the program's usefulness.
The ICHI editor supports text screen formats of any number of columns by
any number of rows. To realize this further capability of ICHI, you must first
have the required monitor and graphic card to provide the proper text screen
setting. In general, most EGA cards are sold with supporting software which
selects a specific variety of screen column and row formats. Universal with
these EGA cards is the 80 column by 43 line format which can be invoked with
the .EXE file EGA43.EXE furnished on this diskette. On invocation, Ichi will
inquire your video bios of the current number of columns and rows and prepares
itself accordingly to function in this environment. ICHI supports monochrome
and EGA adapters, but with the CGA adapter there will be a certain amount of
screen flickering. It is the current design decision to ignore this 'snow'
problem in order to escape the performance degradation penalty which would be
in the order of ten to one.
The IBM enhanced keyboard was introduced with the IBM RT and it is now
standard on the PS/2 family. It features two more F-Keys (F11, F12) and it
recognizes additional alt/ctl combinations of special keys. For example, ctrl
up/down arrows and shifted left/right arrows were not supported by the earlier
bios. If your system bios has the support for the enhanced keyboard, you will
be able to enjoy the benefits of ICHI's exploitation of the new power.
The ICHI editor will retain the text foreground and background attributes
that is found at the time of invocation. Therefore the desired editing color
attributes should be established before calling ICHI. (Norton's SA.COM is
handy-dandy for this purpose.)
The ideas and features of the ICHI editor are culled from many sources.
Among these are the XTC editor from Wendin, the Vi editor from UNIX, the Turbo
Pascal Editor Toolbox, IBM's SPF editor, Solution System's Brief, and WordStar.
Because the design of the ICHI editor is free from the considerations of porta-
bility and generalities which commercial packages must necessarily emphasize,
a higher level of performance is maintained.
The keyboard input commands, though adhering to the WordStar standard, are
vastly extended and improved upon. Several of the ICHI keystrokes have different
meanings depending on the situation. For example, the HOME key sends the cursor
to the left edge of the screen. But if it is already there, it sends the cursor
to the top of the current window. And if it is already there too, it goes all
the way to the beginning of the file. Multiple meanings are also assigned to
the Left/Right arrows, the DelKey, PgUp/PgDn, EndKey, and others. The editing
situation should make it perfectly clear as to which meaning is in effect.
First, we briefly summarize some of the keystrokes here.
Adopted WordStar Meaning Alternate Ichi
keystroke keystroke
^E Cursor up one line up arrow
^X Cursor down one line dn arrow
^Q^E Cursor up to top line HOME HOME
^Q^X Cursor down to bottom line END END
^S Cursor left one char left arrow
^D Cursor right one char right arrow
^Q^S Cursor left to begin of line HOME, ^J
^Q^D Cursor right to end of line END, ^J
^A Cursor left one word ^ left arrow
^F Cursor right one word ^ right arrow
^R Scroll up one screen length PgDn
^C Scroll down one screen length PgUp
^W Scroll up one line up arrow + scrollLock
^Z Scroll down one line Dn arrow + scrollLock
^Q^R Scroll screen to top of file ^PgUp
^Q^C Scroll screen to bottom of file ^PgDown
Adopted WordStar deletion commands:
^G or Del Delete character at cursor
^H or backspace Delete character left of cursor
^Y Delete one line
^T Delete one word
ICHI extended cursor movement, scrolling, and deletion commands:
Ctrl Up/Down Cursor up/down line until a nonblank character
Alt_E Move cursor line to top window
Alt_C Move cursor line to bottom window
Alt_D Move cursor line to mid window
Alt_R Move cursor line half way to top of window
Alt_V Move cursor line half way to bottom of window
Home/End Cursor to top/bottom or left/right of screen
Ctrl_Home/End Cursor half way to top/bottom of screen
Home Home Cursor to top of file
End End Cursor to bottom of file
Trying out the ICHI editor.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
1. Place the diskette with ICHI.COM in a drive.
2. Type ICHI. The program loads, the screen will clear, and a Welcome
message with suitable fanfare will appear.
3. Press the 'Esc' key and you will be in text entry mode.
4. The status line says your file is 'NONAME'. Let's change that first.
Type ^K^E which invokes the function to rename the current filename.
ICHI will cue you to enter a new name for the text stream. Enter the
name 'hello' then hit the Enter key. You will then see the text 'hello'
appear on the window status line. You have renamed the current file
to 'hello'.
5. Your cursor should be at column one, line 1, a fact confirmed by the
information at the right hand side of the status line. Now enter the
text 'hello' and press return.
6. Now the cursor is at column 1 of row 2, confirmed by the status line
again. Let's save this file. Press the F9 key. A very brief message
which reminds you that you will overwrite the existing file, if any,
will appear. Upon confirmation that that is your intention, the editor
will then write the edited file to disk.
7. Now let's terminate the editing session. Press the F10 key and ICHI will
ask you to confirm your intention to leave the editing session.
Answer 'y' and you are back to Dos.
8. At the Dos prompt, type 'dir hello' and press Enter. Dos shows that this
is a file of seven characters. We know these characters are the letters
'hello', a newline character and a carriage return character.
Some basic editor design philosophy.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
This editor is designed for program code maintenance. That thought was
uppermost in mind through out the design. Not all or nearly all the bells
and whistles that more 'Advanced' editors might have are present. But
then you may also find several features that they don't include but which
we happen to believe are essential. There is a trade off between offering
the user a highly complex editor, and therefore an editor which requires
the user to participate in a complex interface, and that of a simpler design.
While ICHI is in no sense a simple editor, it does lack many of the options
redundant in its requirement for multiple user decisions at every turn.
You will not find word wrap offered. (We recommend WordPerfect). But
rather we make sure that you have autoindentation which is quite essential
for coding in a structured style, using, say C, Pascal, PL/I, or Fortran.
(a structured programmer can write structured code in any language).
We do not offer the user a large number of split screens. If you really
want to view ten different files, one line at a time, we failed you badly. We
only offer you a single split screen, but we spare you unnecessary dialogs as
to how many lines you want for the new window and from which existing window to
acquire the resources. Yet we still allow you to resize or switch windows on
the run. With the dual screen and four phantom windows you may open six files
to work on at the same time. Or, if you wish, you may open only one file, but
have the capability to work on six different parts of it, while viewing any two
parts simultaneously.
Brief highlight summary of the ICHI editor.
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
1 WordStar type keyboard input and ^K-^Q-^O option commands.
2 One additional split screen plus four phantom windows which may
be linked. Intelligent processing of data amongst them when they
are linked. Screen sizes are conveniently adjustable.
3 Extended cursor movements and scrolling techniques. Half screen
scrolling up or down and incorporation of placement of the cursor
line at top, middle, and bottom. With Scroll Lock On, directional
keys scroll window up/down as well as left/right.
4 Text may be blocked and hidden. (SPF calls this text exclusion).
Processing of hidden text such as deletion, movement, copying, and
saving are conditionally permitted. Blocked text may be shifted
with the left or right arrow keys.
5 Running Dos 3.1 or higher, exit to Dos is permitted. You may exit to
Dos to compile and test your program without abandoning your editor
session. Typically, you temporarily exit to Dos to check or change
the directory or run some other Dos command. You reenter ICHI by
typing 'exit', and you are returned to the editing session exactly
as you left it. CAVEAT: This command creates a child process that
runs Dos just as if you booted the system afreshed. You may forget
that you are in the child process and reexecute ICHI which works OK,
except that you may run out memory sooner than normally expected.
6 Four F-keys are used for switching between screen windows and phantom
windows. Eight other F-keys are user definable macro keys. These macros
can be predefined by the user in a file, ICHI.MAC, so that they are read
in during program load. If your system do not recognize the F11 and F12
key, then you only have six user definable macros.
7 OnScreen menus are always there, ala Lotus 1-2-3, to help you.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º The Ctrl_U key º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
The Ctrl_U key is used whenever you wish abort from whatever bad situation
that you might have gotten into. It is a very important key which we
designate for the S.O.S scenario. Under no circumstance can it be have any
meaning other than 'get me out of here as safely as possible'.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º The versatile Home-Endkey º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
The HOME key moves the cursor to column 1 of the current line. But
if the cursor is already at column 1, then it moves the cursor to the top
line of the active window. And again, if it is already there, it moves
the cursor to the beginning of the text stream. Similarly, the END key
moves the cursor to the end of the cursor line...unless it is already at
that location, it would move the cursor to the end of line of the bottom
line of the window ...unless it is already there, it would move the cursor
to the end of line of the last line in the text stream.
When the Ctrl key is simultaneously pressed, the HOME key would cause
the cursor to advance half way toward the top of the screen. Similarly,
Ctrl_END moves the cursor half way toward the bottom of the screen.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º H E L P M E N U S º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
In addition to the Lotus 1-2-3 inspired menus which appear on the
message line when either a Ctrl-K, Ctrl-O, or a Ctrl-Q is pressed, ICHI
supports a more verbose set of three HELP MENUS triggered by Alt_H(elp).
By keying Alt_H, these help menus will pop up on the screen. These menus
may be successively cycled through by pressing
summarily dismissed by pressing
acters and ASCII character codes are also available by pop down windows.
These are triggered by Alt_B(ox) and Alt_A(scii) respectively.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º General Editing º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
2.1 To create a new file or add text to an existing file just type.
The characters you type will be added to the text stream at the cursor
position. If the window status line shows 'INS' indicating the insert
mode, the text on the current line to the right of the cursor is shoved
over to the right. In a word, what you type is inserted into the text
stream. If the status line shows 'OVR' then the typeover mode is on, and
what you type will overwrite the existing text. The maximum text line
length is 255. The 'INS' key or ^V toggles between insert mode and
typeover mode.
The editor comes up in autoindent mode with tab at 4 spaces. The
autoindent mode can be toggled. The tab setting can be redefined.
2.2 Cursor movements. On the IBM compatible keyboards, cursor movements
are most easily accomplished by the left-right-up-down arrow keys. In
addition, Ctrl left and Ctrl right moves the cursor a word left and right
respectively. I also find the HOME-END key combination very useful. Among
other things, they moves the cursor to either column one or to the space
after the last nonblank of the current line. The ^J key shuttles the cur-
sor between column 1 and the space after the last character of the current
line. Upon usage, you will find that the latter redundant implementation
is a friendly feature indeed.
The ^Q^W and ^Q^Z group moves the cursor to the top line and bottom
line repectively, keeping the column position of the cursor the same.
Duplicating the effects of ^Q^W and ^Q^Z, the keys PgUp and PgDn also
moves the cursor to the top and bottom of the screen respectively, if it
isn't already there. Additionally, ctrl-HOME moves the cursor from its
present position half way toward the top of screen and ctrl-END moves it
half way toward the bottom of the screen.
The ctrl_Up/ctrl_Down keys moves the cursor up/down until a non-
blank character is encountered. Depending on the coding style, this can
be very useful for matching the 'begin' and 'end' of Pascal source codes
or finding the '}' which terminates a logical block in C source codes.
The Alt_F key initiates cursor movement to the letter specified by
the key pressed. If no letter matches the key pressed, the cursor moves
to the space after the last non-space character on the current line.
2.3 Scrolling. The PgUp/PgDn key moves the cursor to the top/bottom of
screen. Subsequent pressing of PgUp/PgDn scrolls up/down a screen length
in the text stream.
To scroll a single line up or down, use the ^W and ^Z commands
respectively. Single line scrolls may also be done with the up/down
arrow keys when the scroll lock key is pressed. Horizontal scrolling
may be done with the left/right arrow keys when scroll lock is toggled.
To scroll the screen so that the cursor line is at the top, middle,
or bottom of the screen, use Alt_E, Alt_D, or Alt_C. This is much more
pleasant than repeatedly hitting the up or down arrow keys. Look at the
positions of the E, D, C keys on the keyboard and deduce why these
designations are made. To scroll the screen so that the cursor line is
half towards the top or bottom use Alt_R or Alt_V respectively. Again,
look at the positions of the R and V keys and you will see the mneumonic
rationale that motivated these designations.
To scroll to the first or last line of the file use ^Q^R or ^Q^C
respectively. Remember the HOME and END key pair moves the cursor to
the top and bottom line of the window respectively. Well, if the cursor
is already at the top line of the window, pressing the HOME key will scroll
the text a great distance, placing the cursor at the first line of the file.
Similarly, double pressing the END key will place the cursor at the last
line of the text stream.
The Alt_G key initiates scrolling to the line number subsequently
specified by the user. If the line number exceeds the total number of
lines of the editing text, the maximum number of lines is scrolled.
Goto line number may also be done relative to current line. If the user
precedes the number by a plus or minus sign, the cursor will move ahead
or go back that number of lines, scrolling the screen, if necessary, in
order to keep the current line within the window boundary.
2.4 DELETION and UNDO. The keys ^H and Backspace deletes the character
which precedes the cursor. The keys ^G and Del deletes the character at
the cursor. If the cursor is at a blank and there are no subsequent non-
blanks on the line, then ^G or Del effects a line join with the next line.
^T deletes right word. That is it deletes the contiguous string of
'Alphas' to the right of the cursor position plus a contiguous string of
white spaces which may follow. The command ^Q^T deletes a bit more,
namely to the end of the current line.
The command Alt_T initiates deletion until a designated character
is encountered. The text 'Delete to character..press Esc to terminate'
will appear on the message line. Press the character to which deletion is
desired, and a span of characters up to the first occurrence of the char-
acter pressed is hilited. If another character is pressed, the hilited
string is extended until the first occurrence of that character is met.
The span of hilited characters can also be extended or shorten by the left
and right arrow key. This span can extend at most to the last character of
the line. To accept the deletion of the hilited character string, press
Escape. Very often it is desired to delete to the nth occurrence of a
certain letter. This is accomplished by pressing the same letter the
appropriate number of times followed by the Esc key. To delete until end
of line, simply press Alt_T followed by the ENTER key. Ichi will hilite
characters until a ^M is encountered. Most likely there is no ^M on the
line (unless a ^M was deliberately entered via the ^P option), so the rest
of the line is hilited for deletion.
^Y deletes an entire line. ^Q^Y deletes even more, namely the entire
stream. ^K^Y deletes any defined block of text as will be explained in
the following Ctrl_K paragraph. Actually ^Y (and DelKey) is a versatile
command. If the cursor line is within a marked block, ^Y (and DelKey) is
the same as ^K^Y, deleting the marked block.
Any deletions or changes to a line, can be undone by the ^Q^L command,
provided, that the cursor has not left the line in question. As Ctrl_Y
deletes an entire line, Alt_Y inserts the deleted line above the current
cursor position. Thus if you pressed ^Y, deleting a line by mistake, you
may recover by pressing Alt_Y. ICHI saves the last 12 deleted lines in an
array. The Alt_Y command recall these deleted lines in LIFO order and
inserts them just before the cursor line. Alt_K is the undelete block
command. If there were no blocks deleted, this command is ignored. Only
the latest two deleted blocks may be reclaimed. These are the only UNDO
features in ICHI with the exception of the ultimate UNDOer; namely, to exit
the editing session without saving the changes. By not saving the changes,
the original file is not written over, thereby remaining intact.
2.5 Changing the case of a character. You can change the case of the
character under the cursor by pressing Alt_U to toggle the ChangeCaseMode
on and then use the left or right arrow to move away for it. You will
witness a rapid sequence of case changes as long as the arrow key remains
depressed. Only the left-right arrow keys will effect the case change,
not Ctrl_Left or Ctrl_Right, not the Up-Down keys, nor PgUp-PgDn, nor
Home-End, nor anyother cursor movement keys will bring about the case
change effect. If you wish to capitalize the first letters of a sequence
of words, say, you may use a combination of these cursor movement commands
together with ChangeCaseON to bring about the desired results handily.
For some of the more advanced keyboards supported by more advanced
bios, case changing can be done by holding the shift key down while
pressing the left or right arrow keys. By holding the shift key down
and pressing the up or down arrow, a whole line is changed to upper or
lowercase. While you experiment with this feature, be reminded that you
can always restore the current line to its original form by ^Q^L.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º The Ctrl_K Commands º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
3.0 Exiting the editor. The command ^K^X indicates to ICHI that you wish
to terminate the editing session. ICHI will prompt you for a yes/no
response just in case something was amiss. An extra chance for you to
save the editing file, for example. On entry to ICHI the macro key F10
is defaulted to ^K^X. Alt_X is the non-verbose version of editor exit.
Use it cautiously.
3.1 Reading files. To read a disk file into the current window, use
the ^K^R command. ICHI will prompt you for the filename. If the file
does exist, it will be inserted into the text stream after the cursor
line. If the current filename indicated in the window status line
is not NONAME then the new filename will take effect. Otherwise, the
old filename is retained. On entry to ICHI the macro key F6 is defaulted
to ^K^R.
3.2 Writing files. ICHI has two commands which allows you to write
files to the disk. ^K^S will write to a file by the name of the
current filename indicated in the window status line, even if it is
NONAME. The current text stream can be renamed, however,(use ^K^E) to
whatever name you wish. So you may want to exercise this option before
executing ^K^S(see next para). On program load, the macro key F9 is set
to ^K^S. Because writing or overwriting to disk is such an irrevocable
act, ICHI will cue you once for a confirmation. You will learn how to
circumvent this safety device when you get to the Macro redefinition
paragraph.
A second way to write to disk is the ^K^W option. This option will
prompt you for a filename. After you have responded with a filename
ICHI will write the entire text stream to the disk ONLY if there is
currently no block defined in the text stream. If a block is defined,
then ICHI enters its SMART mode and writes only the defined block to
disk. More, you may also use ^K^W to send the stream or block of text
to the file PRN which is the printer.
3.3 Renaming text stream. ICHI has the command ^K^E which allows
you to rename the current text stream. This does not change the name
of any file on disk. But if a filesave command is executed after the
rename process, a file of the new name will be created or if a file by
that new name already exist, it will be overwritten. If the current window
is linked to other windows when the file is renamed, the current window
will become unlinked from its former links. The renamed stream may be a
complete pathname such as 'A:\PASCAL\NEWNAME.INC'. In this event, when the
file save command is subsequently invoked, a file by the name, NEWNAME.INC,
will be saved in the directory PASCAL on the drive A. If the directory
PASCAL does not exist or drive A is not active, the program will summarily
fail without honor, losing all your entire editing session. Be careful!
3.4 Defining blocks. The pair of commands ^K^B and ^K^K are used to
define a block of text. The cursor is placed anywhere on the line
where the block begins and the ^K^B commmand is executed. Then the
cursor is moved to the line where the block ends and ^K^K is executed.
When this definition is complete, the text within the block will be
dimmed. Now, you can do a whole host of block operation with the block
of text so designated.
The command pair ^K^B,^K^K are used so frequently that we assigned
the F7 and F8 to represent them.
3.5 Unblocking. The command ^K^H cancels the blocking definition.
The text display attributes will return to normal. Don't confuse this
with WordStar's original meaning of block hiding which merely changes
the appearance of the screen. ICHI does offer the block hide option,
as we shall see, but not IN THIS SENSE. However, we will use the same
key press sequence for the unblocking command.
3.6 Block moving. A block of text may be moved from one location to
another. The command ^K^V moves the block text from its old location
to the location immediately following the line the cursor is on. If
the cursor is within the block when the ^K^V command is executed, the
block move request is not valid and ICHI will let you hear about it.
Block moving from any of six windows to the current window is permitted.
3.7 Block copying. The command ^K^C copies the text immediately after
the line following the line the cursor is on. The blocked text will
remain dim and blocked, so you may make as many copy of the block to
wherever you want. Copying blocks from one window to another is also
permitted.
3.8 Block shifting. A defined textblock may be shifted left or right.
After pressing ^K and a left or right arrow the defined block is moved
one space in that direction. Subsequent presses of the left or right
arrow key will move the block another space accordingly. This continues
until the ESC or any other key is pressed to exit the block shift mode.
(If the cursor line is within the defined block, the ^K key need not
precede the left or right arrow). This is an invaluable tool for editing
structured source codes where blocks are judiciously indented to make
its logic stand out.
3.9 Block delete and undelete. The blocked text may be deleted with the
command ^K^Y. (if the cursor lies within the highlighted block, a simple
^Y or DelKey suffices to delete the block). Deleting a block of text from
another window is permitted, but there is little practical use for this.
The Alt_K command inserts the last block deleted immediately following
the cursor line. ICHI permits undoing the latest four block deletions.
3.10 Block hiding (collapsing). The command ^K^P will remove the text block
from the display. In its place will be a single message line saying how
many lines not shown and the block number with which the text is associated.
ICHI has a limit of four blocks which can be hidden.
Block hiding or block exclusion or block cacheing are different terms
pertaining to this option. It is a very powerful code maintenance feature
which is also offer on the IBM mainframe SPF editor. When you want to
concentrate on two segments of a text stream separated by a block of
non-relevant text, simply block-hide it and the two pertinent portions of
the text stream will appear together so that proper attention can be
addressed more effectively.
The command ^P is normally a leadin character for ctrl charcter entry.
However, if a block is marked and the cursor is within the marked block,
^P will be interpreted as ^K^P, so that in this common situation, a sim-
ple ^P suffices to hide a block.
3.11 Block recovery (uncollapse). The block-hidden text can be re-expanded
in place by the ^K^O command. ICHI will ask you for the block number to
recover, even if there is only one hidden block. However, if the cursor is
on a block-hidden message line when the ^K^O (or simply, ^O) command is
issued, ICHI will quietly redisplay the hidden text associated with the
message line rather than querying for a block number.
3.12 In general, when the cursor is on the block hidden message line, most
key entries that are not reasonable are suspended. For example, deleting
a character or deleting a line, or cursor movement left or right will
simply be ignored.
3.13 Macro key definition. The eight keys, F5..F12, are user defineable.
On program load, (if not overridden by a user specified macro file,
ICHI.MAC), they are defined as ^Q^Y, ^K^R, ^K^B, ^K^K, ^K^S, ^K^X,
^Q^F, and ^Q^A which are window text delete, file read, blockbegin,
blockend, file save, editor exit, search, search&replace respectively.
The user may redefine them, using conventional editing keys, by the
^K^A command. ICHI will ask for the macro key to be redefined. Then
ICHI will display the current definition of the key and permit the
user to modify this definition. When the user signals completion by
pressing the Enter key, ICHI will accept the new macro value.
To enter a Ctrl character, type the Ctrl character directly. Of
course, certain Ctrl characters cannot be entered, such as ^H and ^U,
for very obvious reasons. Also ^M cannot be entered directly. Indeed, it
is often that we really want to enter a carriage return, so we decided to
confiscate tilde, '~', for that purpose. For example, programming in
Pascal, you might want to define F5 as 'begin~^I'. You accomplish this by
backspacing twice to delete ^Q^Y (yes, ICHI knows that there is only two
characters on the prompt line, although she displays this information to
you using four characters.), then you type the six characters from 'b' to
'~' and press the tab key followed by the Enter key.
You can view the macro definition by using the ^K^A command too.
When ICHI displays the macro definition for you to modify, simply accept
it the way it is by pressing ENTER.
The file DEFICHI.MAC created using the ICHI editor is an example of how
to specify the values of the F5..F10 macro keys. Trailing spaces are not
allowed, but you may circumvent that limitation by an additional space
followed by a Ctrl_H (entered by ^P^H). As described above, to enter a
carriage return, enter the preempted tilde. If your file ICHI.MAC has
only n lines (n < 6) then only the first n macros are user specified. The
others will maintain their default values.
You may have pet editor features that are not directly implemented in
the ICHI editor. It is very likely some of them can be realized by proper
usage of macros.
3.13 Exit to Dos without leaving ICHI. If your version of Dos is 3.1 or
above, and the root directory of the current drive has a compatible
copy of Command.Com, then you may exit to Dos using the ^K^D command.
A message will inform you that you have shelled to Dos. You must type
'Exit' to exit Dos to return to ICHI. This is a highly useful feature in
that it permits you to go to Dos, compile your source code and test it
out without leaving a possibly incomplete editing session. Alt_Z is a
second way to 'goto' Dos. (if your machine recognizes F12, you got a
third way).
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Ctrl_O commands (Windows and Tabs) º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
4.1 Window creation. The ^O group manages the window options. To create
another window, type ^O^O or Alt_O. ICHI will immediately allocate half
of the screen as your new window. After the new window is create, ICHI
switches you directly to it, as can be ascertained by the location of
the cursor. ICHI permits only one additional window to be created.
4.2 Window deletion. Window deletion occurs when ^O^O or Alt_O is pressed.
This is exactly the same command for window creation! Because ICHI only
permits a single additional window to be added, deletion and creation are
mutually exclusive events. Thus there can be no ambiguity as to which
event will occur. The window that is deleted is always the active window,
i.e. the one in which the cursor is cursoring. In addition to the effect
of deletion of all Window text, the window itself also disappear, and the
remaining window will immediately claim the additional display space.
If you did not save your text before deleting the window, the fruit of
your fine labor is lost , but if the window was linked to another then the
text stream will remain intact.
There must always be one active window. So the only time you can delete
a window is when you have a second actively displayed window. The phantom
windows are not deletable.
4.3 Window switching. The keystrokes ^OS and Alt_S will switch from one
active window to the other. Each window has its own top line, current
line, and cursor position which are preserved during window switches.
You can switch back and forth and verify this. When you only have two
windows and you indicate you wish to switch, ICHI doesn't ask you which
window you want to switch to. Elimination of undesired dialog is typical
of efficient and friendly features that ICHI editor strives for.
4.4 Window size adjustments. To adjust the window size, type ^O. Now if
you press the up arrow, the lower window is enlarged by one line as the
upper window is shrunk by the same amount. Keep pressing the up/down
arrow until you are satisfied with the window size adjustment, then
press escape and you will be back in text mode. You can adjust the
window size to maximum or minimum by the PgUp or PgDn key instead of
slow way of the Up/Down arrow keys. Maximum size is 21 lines (assuming
you are editing in the normal 80x25 screen format) as the smaller window
must retain one line - a design decision.
4.5 Window exchange. This can only happen between a phantom window
and the active display window. There are four phantom windows, each
initially set up with a NONAME file and a text stream of 16 characters
(all blanks). When you exchange your current window (the one with the
blinking cursor). You effectively have another clean window or another
file to work with. To exchange with phantom window one, press the F1 key.
Similarly, F2 thru F4 correspond to the other phantom windows.
4.6 Window linkage. Two display windows may be linked so that they share
the same text stream. Once they are linked, they may be scrolled indep-
endently. (^O1 or ^O2 causes the linkage to occur). Any changes in
one window will show up in the other. If one of these windows are
exchanged with a phantom window, then the other display window is linked
to the exchanged-to phantom window. Any changes to the other display
window will also occur in the phantom. And if you now link your current
NONAME window with the non-blank display window, you have three windows
all linked together.
When two windows, each with non-empty text streams are linked with
each other, one text stream will be appended to the other. The order in
which the concatenation occurs will depend on which window is linked to
which. The common text stream will take the name of the first window
text stream to which the second window was linked.
The usefulness of window linkage cannot be overemphasized. For
example, you might be working on a large code file in which you are
interested in only three sections. Link three windows together and
scroll to these area of interest independently. At the tap of an F-key
you are instantly at the portion of code you want. This is much better
than scrolling and/or searching and finding.
4.7 Window Text Deletion. When you finish editing one particular text
stream, you may save the stream to disk (^K^S) and clear the window
text stream (^Q^Y) in preparation for further editing activities. By
pressing ^Q^Y you essentially 'Quickly' do many ^Y's, deleting every
line of the stream, and thereby returning data space to the Operating
System. The window will become blank and the NONAME filename will
appear on the status line. If you did not save your text, you will
have lost the fruit of all your effort. In anticipation of such human
fallacy, ICHI will ask if you really want to delete the entire text
stream, giving you one last chance to avoid a crucial mistake. If this
safeguard is a nuisance, you may use a macro to represent ^Q^Y followed
by the yes response. (We've discussed macros in paragraph 3.11)
Incidently, ICHI doesn't always return data space to the System on
clearing the window. It is gifted enough to recognize the situation when
this should not be done. That is, when there are other windows linked
to the current window.
4.8 Detab. Text created by ICHI are without tabs. When the tab key is
pressed, the proper count of spaces are entered into the text stream.
When text are created by MicroSoft C Compiler, or Masm, or EDLIN, the
embedded tabs will show up as extended ascii symbols on the screen.
When the command ^O^D is executed, ICHI expands the tabs of the text
on the spot, using a tab setting of 8 spaces. Detabbing starts from the
cursor position forward.
4.9 Entab. ICHI has an Entab option which replaces spaces with tabs.
When a text is in the current window, the ^O^B command replaces all
appropriate spaces with tabs at tab spacing = 8. The entabbed stream
will normally occupy less space when saved.
4.10 Set tab. Set tab applies to the particular editing session. On
initial program load, the default tab setting is 4 spaces. This setting
may be changed by the ^O^T option. When ^O^T is entered, ICHI will ask
for the tab spacing. If the response is, say 8, then the tab columns
will be multiples of 8 plus 1.
4.11 AutoIndentation. On entry to ICHI, autoindent is the default mode.
The letters 'AI' on the status line affirms the default autoindent mode.
When this mode is on, the next new line starts at the same column as the
previous line. This is convenient for programming structuredly where
blocks of code are frequently indented to the same depth. ^O^I is a
toggle that switches the AutoIndent mode on/off.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Ctrl_Q commands (cursoring, scrolls, find/replace, restore). º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
5.1 Move cursor quickly on the screen. ^Q^E and ^Q^X places the cursor
quickly on the top and bottom line respectively. Moving quickly to the
beginning and end of line is effected by ^Q^S and ^Q^D.
The Home/End and PgUp/PgDn keys in their various modes can also bring
about these top/bottom line and begin/end line cursor movements.
5.2 Scroll screen quickly. ^Q^R scrolls the screen to the top of the
file, while ^Q^C scroll to the bottome of the file.
The screen may also be scrolled so that the cursor line is at the top,
middle, or bottom of the screen. The commands Alt_E, _D, _C will cause
these effects to occur, as described in paragraph 2.3.
5.3 Quick deletion. ^Q^Y deletes all text associated with the current
window. So it has the result of a lot of ^Y's. Because this command has
a lasting and irreversible effect, a safeguard is introduced. When ^Q^Y
is executed, ICHI prompts the user for a yes/no response to continue.
The macro key F5 is defined as ^Q^Y. When the user becomes comfortable
with the editor and acquires the derring-do, he may modify this macro to
be ^Q^Yy, thus by-passing the 'bothersome' safeguard, shouldering the
responsibility for all calamity that may befall.
5.4 Search and Replace (or Find and Alter). ^Q^F will initiate the find
text activity. The user will be prompted for the text pattern to find.
When ICHI finds the pattern it will move the cursor to the first match in
the text stream. The search may be repeated by just typing a ^L.
Find text and Alter is initiated by the command ^Q^A. The user will
be prompted for both a search string and a replacement string. When ICHI
finds the pattern, it will move the cursor to the matched string and cues
the user for a yes/no answer to replace the found pattern. This activity
can also be repeated by simply entering ^L.
When the user is prompted for a search string, he may simply type in
the pattern and ICHI will accept the pattern exactly as entered. If he
types in the search pattern followed by the option strings /i, /w, or /wi.
ICHI will ignore case, consider whole words only, or both in its search.
Inherently, any global search and replace is a dangerous option. One
should almost always use the ^L to repeat a search and replace. The only
global search and replacement that ICHI condescended to implement is the
global replacement confined to a defined block. Therefore, if a block is
specified, then the search and replace will be global. The block will re-
mained defined after the replacements and the cursor is placed on the last
line of the block. A count of the total replacements will be displayed on
the message line. Use this option with care.
Similar to the global search and replace a blocked global find is also
available. The defined block will be searched for the pattern, and the
total count of pattern occurrences will be noted on the message line. At
the end of the search, the cursor is at the top of the defined block.
5.5 Line restoration. ^Q^L will restore the current line to the way
it was when the cursor was moved there. So, if you made some changes
and leave the line, those changes are no longer restorable by ^Q^L.
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º Special Keys º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
6.0 Special keys are the ten F-keys and the Home End PgUp PgDn and the
four arrow keys on the numeric keypad. Each key by itself or in con-
junction with the Scroll Lock or Caps Lock plays an individual role in
the editing scenario. In some cases, its meaning depends on whether the
cursor is within a marked block or in the message line of a compressed
block. Therefore, be on the lookout for multiple effects of these keys
as they are discribed in the following sections.
6.1 The F1 key switches the current window with phantom window #1.
Similarly, F2 thru F4 switches current window with windows #2 thru #4.
When the phantom window is switched with the current window, the display
will be exactly as it was when last switched, if at all possible. The
stream will be restored with the same Topline and the cursor will be
where it was last. The case where it is not possible occurs when the
window sizes have been altered or when the stream is linked to another
window and some change has taken place.
6.2 The F5 thru F12 keys are user redefinable macro keys. On program load,
these macros are set as follows:
F5 = ^Q^Y (delete stream from current window)
F6 = ^K^R (read a text file)
F7 = ^K^B (mark beginning of block)
F8 = ^K^K (mark end of block)
F9 = ^K^S (save current text stream)
F10 = ^K^X (quit editing session)
F11 = ^Q^F (search for string)
F12 = ^Q^A (search and replace string)
The user may initiate redefinition of these keys by entering ^K^A.
The current definition of the selected key will be shown on the message
line. Modify the current definition, using normal editing methods, then
press
enter a control character, not as I did on the six lines previous to this
line. A carriage return must be entered as '~'.
6.3 The End key moves the cursor to the end of the current line, if the
cursor is not already there. If it is already at the end of line, then
the cursor is moved to the end of line at the bottom of the screen. Again,
if it is already there, the cursor is moved to the end of line at the
bottom of the stream. Similarly, the Home key causes cursor movement in
opposite direction in a analogous manner contingent on the current cursor
position. Therefore, Home Home Home will always take you to the start of
file and End End End will always locate the end of file. Ctrl_Home moves
the cursor half way towards the top of the window from the cursor's present
position. Similarly for Ctrl_End. Selective uses of these two keys and
the Ctrl key prefix will move the cursor very efficiently to the line of
interest.
6.4 The PgUp key moves the cursor to the top line of the window, if it is
not already there. If it is already there, a full screen length of text
is scrolled downward. Similarly, the PgDown key performs the service in
the other direction.
When the PgUp/PgDn key is accompanied by the Ctrl key, the cursor line
will scroll to the top/bottom of the window. These are redundant to the
Alt_E, Alt_C commands but are useful because the Ctrl Home/End, Up/Down,
Left/Right, PgUp/PgDn are located close together and as a group, they
constitute a highly effective line scrolling and cursor movement tool.
If split screen is in effect, then the PgUp/PgDn keys, preceded by ^O,
maximizes one of the two windows while minimizing the other.
6.5 The Up/Down arrows move the cursor up or down one line. If the
cursor is on the top line, then Up_Arr scrolls the window down one line
and moves the cursor to the revealed line. Similar result occurs when
the cursor is at the bottom line of the window.
Word Up/Down. As Ctrl Lf/Rt giving us word Left/Right, Ctrl Up/Dn
gives us word Up/Down. That is, the cursor will cursor upward/downward
in the same column until a nonblank character is encountered. This is
a very powerful feature, allowing you to identify blocks of logical codes
quickly, providing that you are dealing with codes that are written in
some structured fashion using clearly thought out indentations.
If ScrollLockOn then Up/Dn will scroll the window up/down one line.
If split screen is in effect, then the Up/Dn arrow, preceded by the ^O,
alters the sizes of the windows by moving the top line of the lower window
accordingly.
If the shift key is depressed, the Up/Dn key cause a line of text to
change entirely to upper/lower case. (Supported enhanced keyboards only)
6.6 The INTELLIGENT left and right arrows keys. Here's what they do.
IF a block is marked and the cursor is within the block, then
the left/right arrow shifts the marked block accordingly.
ELSE, if scrollLock is ON then
the left/right arrow scrolls the window accordingly.
ELSE, if (ChangeCaseMode is toggled On by Alt_U) or
(the shift key is depressed) then
the left/right arrow performs a case change moving left/right.
ELSE, it simply moves the cursor left/right.
If you have an enhanced keyboard and your system rom supports it,
you have the additional keys F11, F12, Ctrl-Up/Dn_arrows and shifted
Lft/Rt_arrows. In this event, ICHI will allow you to change cases by
merely pressing shift left or shift right instead of the inconvenient
method of toggling ChangeCaseMode by means of Alt_U.
6.7 The following Alt keys are defined:
Alt_E makes the current line the top line.
Alt_D makes the current line the middle line.
Alt_C makes the current line the bottom line.
Alt_R moves the current line half the distance to the top.
Alt_V moves the current line half the distance to the bottom.
If you look at the positions of this group of five keys on the keyboard,
you will readily deduce the logic employed for these designations.
Alt_A pops the ASCII character code table.
Alt_B pops the BOX drawing characters onto the screen.
Alt_H pops the help menu onto the screen.
These are the only three ICHI popdown helpful screens.
Alt_F initiates the go-to-char option.
Alt_G initiates the relative/absolute goto line number option.
Alt_K undeletes deleted blocks LIFO like for at most 4 blocks.
Alt_O either create a 2nd window or delete the active window.
Alt_S switches active window if another window exist.
Alt_T initiates delete to a designated character
Alt_U toggles the ChangeCaseMode on/off.
Alt_X nonverbosely abandons all files and terminates ICHI session.
Alt_Y undeletes deleted lines in a LIFO manner 12 deep.
Alt_Z temporarily suspends the editor and goes to DOS.
On Window Linkage:
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
ICHI permits two display windows and four phantom windows. Any subset
of these six window may be linked together. By this we mean a file may be
shared between windows. Their text stream will be known by the same name.
Any changes to the file from the current display window will occur in its
linked components if its reasonable that that should happen.
Specifically, global effect takes place for the following editing
operations: Blockmove(^K^V), Blockcopy(^K^C), Blockhide(^K^P), Blockrecov-
ery(^K^O), Blockshift(^K->/<-), all text deletions and entries, and file
reading(^K^R).
The following three operations will have only local effects on linked
windows. (1) Window deletion(^O^Y). When one of the two displayed window
is deleted, the display area is recovered and donated to the other window.
The storage occupied by its text stream will be reclaimed only if the
deleted window is not linked to someother. (2) Stream deletion(^Q^Y).
When the text stream is deleted from a window, the stream name will revert
to NONAME. If the current window is not linked to someother, then and only
then, the storage occupied by the stream will be restored to the system.
(3) Scrolling and cursor movement are also local to the active window only.
Well Located Principle:
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
The command ^K^Y deletes a marked block of text. However, if the cursor
is located within the marked block, a simple ^Y or Del will suffice. In the
same vein of logic, ^P alone will hide a block and simple Lf/Rt will shift a
block if the cursor lies within the marked block. Also if the cursor is on
the message line of the associated hidden block, block recovery will be less
verbose; furthermore, a simple ^O will be adequate rather than the otherwise
complete command ^K^O accompanied by a stream of verbosity.
Rules are constrained or liberalized according to the situation. For
example, if the cursor is within the marked block, blockmove will be denied.
In general, block copy will be denied too, unless the cursor is also on the
line of the marked block. If the cursor is on the message line of a
collapsed block, character insertion, deletion, and a whole host of other
illogically actions are summarily forbidden.
Such is the philosophic frame of mind that permeates the development
of this program.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/