Category : Word Processors
Archive   : PEDIT210.ZIP
Filename : PEDIT.DOC

 
Output of file : PEDIT.DOC contained in archive : PEDIT210.ZIP











p E D I T
-------------------
the personal EDITor


Version 2.10

July 1, 1991










pEDIT COPYRIGHT 1989, 1990, 1991



_______
____|__ | (tm)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER





T. G. Muench
P.O. Box 11536
Prescott, AZ 86304-1536




T A B L E O F C O N T E N T S



Introduction . . . . . . . . . . . . . . . . . . . . . 1

Installing pEDIT

1. General Information . . . . . . . . . . . . . . 3
2. Floppy Disk Installation . . . . . . . . . . . 5
3. Hard Disk Installation . . . . . . . . . . . . 6

Quick Starting pEDIT . . . . . . . . . . . . . . . . . 8

Interacting With pEDIT

1. Command Mode . . . . . . . . . . . . . . . . . 12
2. Prompting Mode . . . . . . . . . . . . . . . . 12

pEDIT Commands

1. Cursor Movement . . . . . . . . . . . . . . . . 13
2. Text Manipulation . . . . . . . . . . . . . . . 15
3. Text Deletion . . . . . . . . . . . . . . . . . 18
4. Searching . . . . . . . . . . . . . . . . . . . 19
5. Files . . . . . . . . . . . . . . . . . . . . . 21
6. Buffers . . . . . . . . . . . . . . . . . . . . 23
7. Windows . . . . . . . . . . . . . . . . . . . . 25
8. Key Macros . . . . . . . . . . . . . . . . . . 27
9. Cut and Paste . . . . . . . . . . . . . . . . . 29
10. Miscellaneous . . . . . . . . . . . . . . . . . 30

Macro Facility

1. Macro Types . . . . . . . . . . . . . . . . . . 35
2. Macro Execution . . . . . . . . . . . . . . . . 35
3. Sample Macros . . . . . . . . . . . . . . . . . 35

Extended DOS Shell . . . . . . . . . . . . . . . . . . 37

Compiling From pEDIT

1. Manual Invocation . . . . . . . . . . . . . . . 38
2. Batch File . . . . . . . . . . . . . . . . . . 38
3. Disk Macros . . . . . . . . . . . . . . . . . . 39




T A B L E O F C O N T E N T S



Error Handling

1. Insufficient Internal Storage . . . . . . . . . 40
2. Insufficient Disk Space . . . . . . . . . . . . 40
3. No Initialization File . . . . . . . . . . . . 40

Miscellaneous/Legalities

1. Copyright Notice . . . . . . . . . . . . . . . 41
2. Disclaimer and Warranty . . . . . . . . . . . . 41
3. Registration . . . . . . . . . . . . . . . . . 41
4. Association of Shareware Professionals . . . . 42
5. The Author . . . . . . . . . . . . . . . . . . 42

Add-On Products . . . . . . . . . . . . . . . . . . . 44

Appendices

A. Key Bindings
1. Labelled Keys . . . . . . . . . . . . . . . 45
2. WordStar . . . . . . . . . . . . . . . . . . 46
3. Emacs . . . . . . . . . . . . . . . . . . . 48
4. Standard and Alternate . . . . . . . . . . . 50
B. The DOS Environment . . . . . . . . . . . . . . 52
C. Initialization File . . . . . . . . . . . . . . 53
D. Help File . . . . . . . . . . . . . . . . . . . 54
E. Keyboard Help File . . . . . . . . . . . . . . 54
F. Color Codes . . . . . . . . . . . . . . . . . . 55




I N T R O D U C T I O N


pEDIT is a text editor for the IBM Personal Computer
family. It has been tested on XT, AT, 80386 and PS/2 models
with MDA, CGA, EGA and VGA monitors. pEDIT requires Version
2.1 or higher of PC-DOS/MS-DOS and a minimum of 320k of
memory; 512k is recommended as is a hard disk.

pEDIT is not a word processor or desktop publisher and
does not have features like graphics, multiple fonts or the
like. While the purpose of pEDIT is to create and edit text,
it does have several features normally associated with word
processors: settable margins, automatic word wrap, paragraph
indent and line centering. Words (or parts of words) can be
Capitalized, lower-cased or UPPER-CASED. Paragraphs can be
'filled' or reformatted to fit within the existing margins.

The editor configures itself by loading an 'initiali-
zation' file at start up. This file contains environment
settings and key bindings that are used to customize the
editor. You can make pEDIT work the way you want it to
work... even mimic another editor such as WordStar or Emacs.
pEDIT is completely configurable; if you don't like the
supplied configurations, modify them or create your own.

pEDIT is unique among shareware editors in that every-
thing is treated as text in a buffer. This includes all
editor commands and the output from shelled DOS commands.
Any command can be recalled, edited and reissued. However,
most common commands are bound to keys because no one -
including the author - wants to type in lengthy commands.

Every effort has been made to make the editor perform as
efficiently as possible. The speed is quite good on an AT (or
higher) class machine with a hard drive. All text is stored
entirely in memory, which makes accessing any part of the
file very fast. The user can move from the top to the bottom
of any buffer instantaneously.

Release 2.0 of pEDIT added many new features which made
it competitive with any shareware editor available:

* file pick lists
* disk macros
* on-line help
* wild card search





- 1 -




Now, Version 2.10 adds:

* multi-keystroke commands
* WordStar and Emacs configurations
* global find and replace (all buffers)
* automatic paragraph indent
* wildcards now work with replace
* 80-column ruler












































- 2 -




I N S T A L L I N G p E D I T


1. General Information

The distribution diskette contains the following files.
An asterisk indicates the file is included with the regis-
tered version only.

READ.ME

Text file containing information about the INSTALL
program and how to get started with pEDIT

WHATS.NEW

New features of pEDIT 2.0 and 2.10

PEDIT.DOC

This document; it is a standard Ascii text file that
can be typed or printed

PEDIT.EXE

The pEDIT executable program

PEDIT.HLP

Help file containing a customizable description of
every pEDIT command

PEDWST.INI
PEDEMC.INI
PEDSTD.INI
PEDALT.INI

Sample initialization (init) files for WordStar,
Emacs, Standard and Alternate configurations

PEDWST.KEY
PEDEMC.KEY
PEDSTD.KEY
PEDALT.KEY

Keyboard help files for the 101 (Enhanced) keyboard
to match the above initialization files

WSTLETTR.PMC
WSTOTHUP.PMC


- 3 -




WSTOTHDN.PMC
WSTWREV.PMC

Sample WordStar disk macros; see the section titled
'Macro Facility' for more information

EMCLETTR.PMC
EMCOTHUP.PMC
EMCOTHDN.PMC
EMCWREV.PMC

Sample Emacs disk macros

STDLETTR.PMC
STDOTHUP.PMC
STDOTHDN.PMC
STDWREV.PMC

Sample Standard disk macros

ALTLETTR.PMC
ALTOTHUP.PMC
ALTOTHDN.PMC
ALTWREV.PMC

Sample Alternate disk macros

REGISTER.DOC

How to register for pEDIT; registered owners receive
the latest version of pEDIT without the shareware
screens, a printed manual, telephone support, FREE
utilities and one FREE upgrade

VENDOR.DOC

Information for shareware vendors regarding require-
ments for distributing pEDIT

INSTALL.EXE

Program to install pEDIT on floppy and hard disk
based systems

(*)KEYRATE.COM

Program to set the keyboard repeat rate on AT and
later computers

(*)STAYDOWN.COM


- 4 -




Memory-resident utility from PC Magazine to allow
Ctrl-, Alt- and Shift- commands to be entered as 2
keystrokes.

The distribution diskette is a MASTER and should be used
only for making copies. It should be write-protected and
NEVER used for editing.

The installation program INSTALL displays a screen of
information that details how to use the program. Help is
available at any prompt by entering a question mark. The
procedure can be aborted at any prompt by typing Ctrl-C.

The following installation procedures assume you have a
basic knowledge of PC operation and can format a diskette.
Refer to your DOS manual as needed.

There are some things to check and decisions to make
BEFORE starting the installation:

1. If you are installing pEDIT for the first time, make sure
the target device has at least 275k of free disk space

2. Choose one of the supplied configurations (WordStar,
Emacs, Standard or Alternate); see the Appendix for a
description of each

3. Decide if you want to install the optional KEYRATE and
STAYDOWN utilities (Registered version only)

4. Decide if you want to setup a DOS environment variable -
highly recommended for hard disk systems; refer to the
Appendix for additional information

5. If you are upgrading pEDIT, decide if you want to keep any
existing INI or KEY files; if so, rename them so they can
be restored after the installation.


2. Floppy Disk Installation

This procedure assumes you have 2 floppy disks of at
least 360kb each. pEDIT will not be very usable with a single
360kb floppy - there will not be much room for text files.

In a floppy-based system, Drive A: will hold the program
disk with the pEDIT executable, initialization, help and key-
board help files. Drive B: will contain a work disk with your
documents, source programs or other text.



- 5 -




1. Format two diskettes; make one (the program disk) a system
disk if you want to be able to boot from it; label the
floppies 'pEDIT Program' and 'pEDIT Work'

2. Insert the distribution diskette in Drive A:

3. Set default to the A: drive and run the INSTALL program

A>INSTALL

4. Remove the distribution disk from Drive A; move the pEDIT
Program Disk to Drive A and insert a pEDIT Work Disk in B:

5. If you want KEYRATE to be run automatically when you boot,
copy KEYRATE.COM to your system disk and add the following
line to your AUTOEXEC.BAT file:

KEYRATE FAST

6. If you want STAYDOWN to be installed when you boot, copy
STAYDOWN.COM to the system (boot) diskette and add this
line to AUTOEXEC.BAT:

STAYDOWN

7. If you modified AUTOEXEC, reboot your computer

8. Proceed to "Quick Starting pEDIT"


3. Hard Disk Installation

This procedure assumes you have one floppy drive and a
hard disk of any size. You will most certainly want to in-
stall pEDIT on the hard drive for improved speed.

You will need to decide if you want to install pEDIT in
the root (\) directory, in its own directory (\PEDIT), or in,
for example, a \TOOLS or \UTIL directory. The example assumes
pEDIT will be installed from Drive A into its own directory
on Drive C.

1. Insert the distribution diskette in Drive A:

2. Set default to the A: drive and run the installation program

A>INSTALL

3. Remove the distribution disk from Drive A:



- 6 -




4. If you want KEYRATE to be invoked automatically when you
boot, copy KEYRATE.COM to the root directory of your hard
disk and add the following line to AUTOEXEC.BAT:

C:\KEYRATE FAST

5. If you want STAYDOWN to be installed when you boot, copy
STAYDOWN.COM to the root directory and add this line to
AUTOEXEC.BAT:

C:\STAYDOWN

6. Add the directory containing the pEDIT executable to your
DOS PATH. It is also strongly recommended that you define
a DOS environment variable so the editor can find the
files it needs; add the following line to AUTOEXEC.BAT,
again substituting your directory if other than \PEDIT:

SET PEDIT=C:\PEDIT

7. If you modified AUTOEXEC, reboot your computer

8. Proceed to "Quick Starting pEDIT"





























- 7 -




Q U I C K S T A R T I N G p E D I T


The program file (PEDIT.EXE) must be accessible through
your DOS PATH, or be in the current default directory. The
help, keyboard and initialization files (PEDIT.HLP, PEDIT.KEY
and PEDIT.INI) must be accessible via the DOS environment or,
again, be present in the current directory.

It is almost mandatory that hard drive users define a DOS
environment variable 'PEDIT' so the editor can find the files
it needs. The Appendix contains detailed information on how
to do this.

If you have a floppy-only system, make sure you have a
copy of COMMAND.COM present. pEDIT must be able to find this
file to use the (X)Dos and (X)Spawn commands.

pEDIT can be started in one of two ways - with or without
a file specification. If you don't want to start out editing
an existing file, enter:

C>PEDIT

The normal way of starting pEDIT would be to specify the
name of a file to be edited using either a specific or wildcard
file specification:

C>PEDIT D:\PATH\FILENAME.TYP

C>PEDIT D:\PATH\*.DOC

If you use a wildcard specification, you will be pre-
sented with a FILES window containing a 'pick list' of all
matching filenames (unless there are "No matching files" or
"Too many files"). If you see the latter error and have
specified e.g. '*.*', narrow the search.

Once a file has been selected, the screen will clear and
you will see pEDIT's inverse status line. Next the message
line will show that the initialization file is being read -
provided, of course, that pEDIT can find one. Finally, if a
matching file was found, it will be loaded in and pEDIT will
display the first screenfull of text. The cursor will be
positioned at the top of the buffer.







- 8 -




+--------------------------------------------------------+
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
+--------------------------------------------------------+
11 | BufferName Global Mode Direction |
+--------------------------------------------------------+
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
+--------------------------------------------------------+
22 | BufferName Global Mode Direction |
+--------------------------------------------------------+
23 Command:
24 Working . . .










Figure 1
------------
pEDIT Screen










- 9 -




pEDIT uses screen rows 1-24 for text, status, commands
and messages. The 25th line is not used. The pEDIT screen can
contain 1 or 2 windows. A single window holds 21 lines of
text; if the screen is split, each window contains 10 lines.

Figure 1 shows a representation of the pEDIT screen with
two windows displayed. It is important to realize that you
can view two different files or two portions of the same file
when the screen is split.

Each window has a reverse video status line at the
bottom. What the status line shows depends on what the window
is used for. If it is a text window, the status line shows
the buffer name, the current scope (blank=Local/Global), mode
(Insert/Overstrike) and direction (Forward/Reverse). For an
informational window, it indicates the type of information
being displayed - HELP, FILES, SHOW, LIST, ERROR, etc.

A window can be thought of as a viewport into a portion
of the text. Figure 2 shows a text buffer (represented by the
large box) and a window into the text. A window can never
show more than 80 columns of text. pEDIT uses horizontal
scrolling so the window can be into any portion of the text,
not just the leftmost 80 columns. pEDIT can handle lines up
to 32767 characters in length.

The command line displayed at row 23 is actually a one
line window into the COMMAND buffer. The 'Command: ' prompt
is displayed whenever the editor is in command mode.

The message line at row 24 is used to display inform-
ational text, errors, etc. Also shown at the right margin is
the 'Working . . .' message that flashes whenever pEDIT is
busy loading a file, searching, etc. The message is erased
whenever a key is pressed.

















- 10 -




+--------------------------------------------------------+
| |
| +----------------+ |
| Now is |the time for all| good persons to come to the |
| aid of |their country. | |
| | | |
| |<--- Window --->| |
| | | |
| +----------------+ |
| |
| |
| |
| |
| |
| |
| |
|<----------------------- Buffer ----------------------->|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+--------------------------------------------------------+








Figure 2
---------------
Buffers/Windows












- 11 -




I N T E R A C T I N G W I T H
p E D I T


There are two ways to interact with the editor - command
mode and prompting mode. In either mode, pEDIT will ask for
missing parameters if an incomplete command is given. For
example, if you enter "Replace", you will be asked for "Old
string" and "New string".


1. Command Mode

Command mode is entered by pressing the DoCommand key -
normally the key. The prompt "Command: " is displayed
on the command line and the cursor will be positioned after
the colon. At this point you can issue any valid pEDIT
command, for example "WRITE FILE" or "SET MARGINS 10 70".

It is very important to realize that the command line is
a window into the COMMAND buffer. All defined keys and pEDIT
commands will work as expected - you can move backwards and
forwards, toggle between insert and overstrike mode, etc. The
command prompt is part of the text and can be over-written or
deleted; be careful to leave the "Command: " portion of each
line intact.

Note that the command window does not have an associated
status line so you will not be able to see the current mode
and direction. However, these parameters can be set for this
buffer as for any other buffer.


2. Prompting Mode

Prompting mode is active whenever pEDIT is asking for
input and the "Command: " prompt is not displayed. In this
mode you will not have access to all of pEDIT's commands and
key definitions. Only Insert mode is supported; limited line
editing is available using a subset of your defined keys:

Move Up Recall the last command entered
Erase Prev Erase the previous character
Erase Char Erase current character
Move Left Move cursor left one character
Move Right Move right one character
Move Home Position to start of line
Move End Position cursor to end of line




- 12 -




p E D I T C O M M A N D S

1. Cursor Movement

Moving the cursor around in the text is among the most basic
of all editing functions. The following commands let you do
just that.

1.1. Move Top

This command positions the cursor to the first line of the
buffer, scrolling or repainting the screen as necessary.
pEDIT keeps all text in memory, making it very fast to move
to the top of the buffer from any point in the buffer.

1.2. Move Bottom

This function moves the cursor to the dummy last line at the
end of the buffer. The screen will scroll or repaint as re-
quired.

1.3. Move Home

The action of MoveHome depends on the position of the cursor
within the current line. If the cursor is not at the begin-
ning of the line, it will move there. If it is at the start
of a line, it will move to the start of the previous line.
This command is normally bound to the key.

1.4. Move End

The action of MoveEnd depends on the position of the cursor
within the current line. If the cursor is not at the end of
the line, it will move there. If it is at the end of a line,
it will move to the end of the next line. This command is
normally bound to the key.

1.5. Move Up

Moves the cursor up one line in the current buffer. There is
no action if the cursor is already on the first line of the
buffer. Note that pEDIT attempts to keep the cursor as close
to the same column as possible. The command is normally bound
to the key.

1.6. Move Down

MoveDown moves the cursor down one line in the current
buffer. The cursor cannot move if it is already on the dummy



- 13 -




last line of the buffer. pEDIT will keep the cursor as close
as possible to the same column. This command is normally
bound to the key.

1.7. Move Left

Moves the cursor left one character position. If the cursor
is at the beginning of a line, it will wrap to the end of the
previous line. This command is normally bound to the
key.

1.8. Move Right

Moves the cursor right one character position. If the cursor
is at the end of a line, it will wrap to the beginning of the
next line. This command is normally bound to the key.

1.9. Move Word

MoveWord will move the cursor to the beginning of the next
word in the current direction. If the direction is Forward,
it will move toward the end of the buffer; if the direction
is Reverse, toward the beginning of the buffer.

The screen will scroll or repaint depending on the state of
Select. If Select is active, the screen will be redisplayed.
If Select is not active, scrolling will take place to keep
the cursor on the fourth line from the top or bottom of the
window.























- 14 -




p E D I T C O M M A N D S

2. Text Manipulation

These commands are used to manipulate text - insert new text
and change the form of existing text.

2.1. Insert Char

This is the default when one of the typing keys is pressed.
In Insert mode, the character will be inserted into the
buffer at the current cursor position; text to the right is
"shoved over" to make room. In Overstrike mode, the character
is simply overwritten.

pEDIT uses automatic word wrap to keep text between the
defined margins as you type. If a word will not fit inside
the current right margin, it will be moved to the start of
the next line. The first line of a paragraph will be auto-
matically indented if the PIndent parameter is set.

When the Tab key is pressed, the cursor will move to the next
tab stop. pEDIT supports only tab stops at every eighth
column. Control characters display as a caret (^) followed by
the displayable character, i.e. Ctrl-A shows as ^A.

2.2. Open Line

This function opens up a new (empty) line for text insertion.
The end result is the same as pressing Enter followed by Move-
Left except that there will be no indenting.

2.3. Fill Paragraph

Reformats a paragraph or portion of a paragraph to fit within
the defined margins. Paragraph indenting, if any, is honored
for the first line. Use this command after you have inserted
or deleted text or changed margins.

The SetMargins and SetPIndent commands are used to set the
margins and paragraph indent, respectively. Reformatting
begins at the current line and stops at the end of the para-
graph. A paragraph is defined as contiguous text bounded by
empty lines both above and below.


2.4. Indent

This function is very useful in programming when you want to
indent a section of code in or out without having to manually



- 15 -




edit each line. Indenting is by levels where one level is 4
character positions or one-half a tab stop. Indent uses tabs
and spaces to indent the line to the desired offset.

To use indent (1) position the cursor to the start of the
first line, (2) toggle Select on, (3) highlight the entire
range of lines to be indented and (4) issue the "INDENT" or
"INDENT n" command. Specify the number of levels (n) as a
positive or negative integer - positive for 'out' (toward the
right), negative for 'in'.

2.5. Auto Indent

This function is very useful in programming. It is used to
automatically indent a new line the same as the previous
line. pEDIT uses the same leading whitespace (spaces and
tabs) as the previous line. AutoIndent is normally used at
the end of a line but the command can be issued anywhere. The
command is normally bound to .

2.6. Center Line

This command centers the current line - the line the cursor
is on - between the existing margins. Only spaces are used to
indent the line to the appropriate position.

2.7. Capital Word

Capitalizes the current word starting at the current position
of the cursor within the word. The case change does not start
at the beginning of the word; this is to allow, for example,
'Compuserve' to be changed to 'CompuServe'.

2.8. Lower Word

This command converts the current word to lower-case starting
at the current position within the word. All characters from
the cursor to the end of the word will be changed to lower-
case.

2.9. Upper Word

UpperWord converts the current word to upper-case, again
starting at the current character position and not at the
beginning of the word.

2.10. Quote Char

This function is used to enter special characters into the



- 16 -




text. pEDIT prompts you with "Press key to be added: "; at
this point press one of the special keys. For example, to
insert a form feed (Ctrl-L, Ascii 12) press Ctrl-V followed
by Ctrl-L. The character will show as '^L' on the screen.

The feature can also be used with Find and Replace. To find a
line feed (Ctrl-J, Ascii 10) for example, press the DoCommand
key and enter "FIND ^V^J".

Note that extended keys such as the PC keypad and function
keys cannot be quoted. The PC graphics characters - those
above Ascii 127 - are inserted in a special way. Hold down
the Alt key and enter the decimal value of the character
using the numeric keypad only; release the Alt key when done.

2.11. Trans Char

This command transposes (swaps) two characters of text within
a line. The cursor must be on the second character when you
issue the command. The cursor cannot be positioned past the
end of the line.































- 17 -




p E D I T C O M M A N D S

3. Text Deletion

These commands are used to erase existing text and to restore
deleted text. Deletion can be by character, word or line.

3.1. Erase Char

Deletes the current character - the character the cursor is
on. The action is dependent on the current mode. In Insert
mode, the character is deleted and text to the right of the
cursor is shifted left to "fill in the hole". In Overstrike
mode, the character is replaced by a space.

3.2. Erase Prev (Backspace)

Deletes the previous character - the character to the left of
the cursor. In Insert mode, the character is deleted and text
to the right of the cursor is again shifted toward the left.
In Overstrike mode, the character is replaced by a space.

ErasePrev is permanently bound to the Backspace key which
cannot be redefined. BackSpace therefore functions the same
as it does at the DOS (Operating System) level.

3.3. Erase Word

EraseWord deletes text from the current position in a word to
the end of the word. The current direction (Forward/Reverse)
does not affect the action; deletion is always toward the end
of the word.

The current mode also has no effect on EraseWord. The entire
word (or portion of a word) will be erased.

3.4. Erase Line

Erases an entire line or a portion of a line. If the cursor
is at the beginning of a line, the entire line - including
the end of line marker - is erased and stored in the text
buffer. If the cursor is not at the beginning of a line,
deletion is from the current position to the end of the line.

3.5. Restore Text

This command restores the text last deleted by EraseWord or
EraseLine. This text is stored in a special text buffer for
later restoration. This text buffer is rebuilt after every
action so only the last erasure can be restored.


- 18 -




p E D I T C O M M A N D S

4. Searching

These commands are used to search for text and to replace one
text string by another. A limited wild card facility permits
matching the beginning and end of line. The SetScope command
determines if the searching is to be local (current buffer)
or global (all buffers).

4.1. Find

Used to search for a text string. To initiate this function,
press the Find key and respond to "String to find" or press
DoCommand and enter "FIND ". The direction of the
search will be in the current direction. An executing Find
operation can be cancelled by pressing the Abort key.

If the target string is all lowercase, the operation will be
case-insensitive; that is 'pedit' will match 'pedit', 'pEDIT'
and 'PEDIT'. If, however, the target contains any uppercase
characters, the match will be exact, i.e. 'pEDIT' matches
only 'pEDIT'.

Special symbols are used to match beginning of line (bol) and
end of line (eol). Use '\\<' for bol and '\\>' for eol. For
example, '.\\>' matchs a period only if it is at the end of a
line.

4.2. Findnext

This command will find the next occurrence of the last search
string you specified. It is advisable to have Findnext bound
to a key so only a single key press is required to repeat the
last search operation.

4.3. Replace

pEDIT has a very powerful search and replace function. To
initiate it, either press the Replace key and reply to the
"Old string:" and "New string:" prompts, or press DoCommand
and enter "REPLACE ".

pEDIT will search for each occurrence of 'old' and prompt you
with "Replace (Y)es (N)o (A)ll (L)ast (Q)uit: "

Y, Enter - replace this occurrence
N - skip this replacement
A - replace all occurrences from this point



- 19 -




L - make this the last replacement and quit
Q - quit.

Matching the old string will follow the rules listed for the
Find command. The same wild cards as Find are permitted in
the 'old' string only.














































- 20 -




p E D I T C O M M A N D S

5. Files

These commands pertain to the reading and writing of disk
files.

5.1. Get File

This command loads in a new file for editing. pEDIT supports
wild-card file specifications of the type '*.*' and '*.BAS'.
If more than one file matches the specification, you will be
presented with a list of all matching file names in alpha
order. Use the arrow keys to highlight the desired file and
press Enter. Press the Abort key to cancel.

Once a file has been selected, pEDIT will create a buffer for
the file and load its contents into memory. The status line
will show the new buffer name and the first screen of text,
if any, will be displayed. If no matching file exists, pEDIT
will display "Creating file" and present an empty screen.

pEDIT allows a total of 6 user buffers.

5.2. Include File

Reads in the specified file from disk and inserts it into the
buffer starting at the current cursor location. The result is
the same as if the user typed in the text contained in the
file.

Include File should be used only for relatively small files.
The function uses the normal InsertChar routine, not the much
faster GetFile which loads text directly into memory.

5.3. Write File

WriteFile is used to save the contents of the current buffer
to disk without terminating the editing session. If no assoc-
iated file name has been specified, pEDIT will ask for one.

pEDIT verifies that there is sufficient disk space for the
file BEFORE starting the save operation. The section on Error
Handling has a full description of what to do if you get an
error while saving a file.

You can change the name of the associated file at any time by
using the RenameFile command.




- 21 -




5.4. Rename File

This command changes the name of the disk file associated
with the current buffer. The new name will be used at the
time of the next WriteFile operation.

Use RenameFile when you want to save a file under a name
other than the one the it was called up under.












































- 22 -




p E D I T C O M M A N D S

6. Buffers

These commands affect how text is viewed. You can pick which
buffer(s) to view, set the mode and direction for a buffer,
and so on.

6.1. Show Buffer

This command displays detailed information about the current
buffer: the buffer name, associated file name, current mode
and direction, number of lines and characters of text, etc.
The status line also shows the pEDIT version number.

6.2. List Buffers

This function lists a summary of all defined buffers - the
two system buffers (COMMAND and DOS) plus up to 6 user
buffers. The following items are displayed: buffer name,
number of lines in the buffer, buffer type (System or User),
whether or not the buffer has been modified and the name of
the file associated with the buffer.

6.3. Buffer

Use this command to switch between buffers. You will be
presented with a BUFFER window containing the names of all
buffers except the COMMAND buffer. The cursor will be pos-
itioned on the first User buffer. Use the up and down arrow
keys to highlight the desired buffer name; press Enter to
select that buffer.

It is no longer possible to switch to the COMMAND buffer.

6.4. Trim Buffer

This function 'trims' the current buffer by removing trailing
blanks from all lines of text.

TrimBuffer is useful in any document where a left margin has
been defined. pEDIT automatically indents every line to the
specified left margin, which can result in "empty" lines
between paragraphs. These empty lines can take up a lot of
space in a large document.

6.5. Change Mode

ChangeMode is used to toggle between Insert and Overstrike



- 23 -




modes. If the mode is Insert when the command is given, it
will change to Overstrike and vice versa.

6.6. Change Dir

Use this command to toggle between the Forward and Reverse
directions. Note that only Find, Findnext, Replace and Move-
Word use the buffer direction.

6.7. Mark

This function is used to 'mark' a particular place in a
buffer so you can return to it at some later time. There can
be only one marker in each buffer. pEDIT tries to stay as
close as possible to the original mark as text is inserted
and deleted.

6.8. Goto Mark

This command moves to the position (line and offset) defined
by the last Mark command.

6.9. Line

The Line command is used to display the current line number
or move to a particular line in the buffer. Enter "LINE" by
itself to display the current line and number of lines; use
"LINE nn" to move to line number nn.
























- 24 -




p E D I T C O M M A N D S

7. Windows

The window functions control the number of windows on screen
and let you select the current window. A window can be moved
up/down/left/right to view the desired portion of a buffer.

7.1. One Window

The OneWindow command 'unsplits' the screen. If there are 2
windows on screen, the current window - the one the cursor is
in - becomes the only window. The screen will be repainted to
show a full 21 lines of text. The line the cursor was on when
the command was issued becomes the top line of the window.

7.2. Two Windows

TwoWindows 'splits' the screen if there is only one window
visible. Both windows will initially show the same 10 lines
of the current buffer. The cursor will move to the other
window anticipating that you want to load in another file.

7.3. Other Window

If the screen is split, this command will move the cursor to
the other window. The cursor will move to the row and column
stored the last time the cursor was in the window.

7.4. Prev Screen

Scrolls the screen up - towards the beginning of the buffer.
The number of lines scrolled will equal the number of rows on
screen - 21 or 10 depending on the window size. The current
direction has no effect on this command.

If the screen cannot scroll the full amount, the cursor will
move up until it hits the first line of the buffer. This
command is normally bound to the key.

7.5. Next Screen

Scrolls the screen down (toward the end of the buffer) by the
number of rows in the current window. The current direction
has no effect. The command is normally bound to the
key.

If the screen cannot scroll the full amount, the cursor will
move until it hits the dummy line at the end of the buffer.



- 25 -




7.6. Shift Left


The Shift commands provide for horizontal scrolling - the
ability to see text beyond column 80. ShiftLeft moves the
window to the left (toward the left margin) the specified
number of columns.

7.7. Shift Right

ShiftRight shifts the screen to the right - toward the end of
the line - by the number of columns you specify. How far the
window can be shifted is limited only by pEDIT's maximum line
length of 32767 characters.







































- 26 -




p E D I T C O M M A N D S

8. Key Macros

pEDIT's key macro facility lets you automate repetitive
tasks. With the following commands you can start a "learn"
sequence and pEDIT will "remember" all keystrokes until you
give the Remember command. The Execute command is used to
play back the keystrokes.

With disk macros it is possible to have several pre-defined
macros available for use.

8.1. Learn

The Learn command is used to start recording keystrokes. The
recording will continue until the Remember command is given.
pEDIT will store all typing keys, function keys and special
keys such as control keys.

Any keystrokes can be stored in a pEDIT Version 2 key macro.
The only restriction is that a macro containing a REPEAT
command cannot, for obvious reasons, itself be repeated.

8.2. Remember

Remember is used to end the keystroke recording started by
Learn. pEDIT will ask for a key to bind to; press any of the
definable keys on the keyboard. You cannot bind to the Tab,
Enter or Backspace keys. Only one keyboard or dynamic macro
can be defined at a time.

A macro must not be bound to a key that is contained within
the macro. If this happens, the macro routine will go into a
loop and probably crash the system.

8.3. Save Macro

SaveMacro is used to save the currently defined keyboard
macro to disk. Enter only a file name; pEDIT automatically
adds the extension '.PMC'. The editor will write the macro
file in the directory pointed to by the PEDIT environment
variable, or if none is defined, in the current directory.

If a file of the same name already exists, you will be given
the chance to overwrite it or cancel.

8.4. Execute




- 27 -




Execute is used to execute a macro. When this command is
issued, the keystrokes are 'replayed' as if you entered them.
There are two forms of this command: one for a dynamic macro,
one for a disk macro. See the section titled 'Macro Facility'
for more information.

Use 'EXECUTE' by itself for the single dynamic macro. To
execute a disk macro, use a command of the form 'EXECUTE
filename' where 'filename' is a valid DOS file name without
an extension. pEDIT automatically adds the file type .PMC to
all disk macro file names.









































- 28 -




p E D I T C O M M A N D S

9. Cut and Paste

These commands allow for electronic "cut" and "paste". You
can delete (cut) a portion of text and store it for later
use. The contents of this "paste" buffer can then be copied
as many times as desired. Alternately, there is a function to
make a copy of selected text without removing it.

9.1. Select Text

SelectText is a toggle that turns the select state on/off. If
the state is off, it will be turned on and vice versa. When
active, selected text is highlighted in reverse video as the
cursor is moved. Select is automatically turned off after any
RemoveText or StoreText command. To cancel the selection,
simply issue the command again.

9.2. Remove Text

This command removes the selected text and stores it in the
paste buffer. The paste buffer is rebuilt every time Remove-
Text is invoked so only the most recently deleted text is
available.

9.3. Store Text

StoreText is similar to RemoveText except that the text is
not removed from the buffer. The paste buffer is rebuilt to
contain the selected text. Use this command whenever you want
to make a copy of some text without deleting it.

9.4. Insert Here

Inserts text from the paste buffer into the current buffer
starting at the current cursor position. Note that InsertHere
can be invoked more than once to make multiple copies of the
stored text.













- 29 -




p E D I T C O M M A N D S

10. Miscellaneous

These commands don't fall into any other general category.

10.1. Do Command

When the "Do" key is pressed the editor will respond with the
'Command: ' prompt. At this point you can enter any valid
pEDIT command. Commands can be upper- or lower-case or mixed.
Note that commands must be entered in full with spaces in
between words.

The Command line is really a one-line window into the COMMAND
buffer. All defined keys can be used on the command line for
editing the current line or recalling previous commands. Use
MoveUp and MoveDown to scroll up and down through the stored
commands.

10.2. Recall

Recall is used to recall the last command given via Do-
Command. The end result is the same as pressing the DoCommand
key followed by the up arrow with one important difference;
the previous command is copied to the current command line.
The command can of course be edited before pressing Enter to
begin execution.

10.3. Abort

pEDIT now has a user-definable abort key. It is no longer
'hardwired' to Ctrl-C; this conflicted with WordStar which
uses Ctrl-C as a command key.

The abort key should be defined in your initialization file.

10.4. Refresh Screen

This command is used to clear and repaint the screen. Use
RefreshScreen if, for any reason, the screen should be over-
written or otherwise obliterated. Everything - including
reverse video - will be redrawn.

10.5. Define Shift

This function defines a shift or "lead-in" key for multi-key
commands. It signals pEDIT when to expect a second keystroke;
therefore a shift key cannot be a command key by itself.



- 30 -




Normally this command would be specified in pEDIT's init file
before other key definitions. A maximum of 5 shift keys can
be defined.

10.6. Define Key

Used to dynamically define a key during an editing session.
pEDIT will ask for a procedure name and a key press. The
procedure name is any valid pEDIT command entered in full (no
abbreviations) with or without parameters. An example is "SET
SCOPE GLOBAL".

It is best to put key bindings in the initialization file so
they are automatically defined when the editor is invoked.

10.7. Show Key

Used to show what procedure is bound to a key. pEDIT will
prompt for a key press and display the name of the procedure,
if any, bound to that key.

10.8. List Keys

Lists all defined keys and the procedures bound to them.
pEDIT will pause in between screens; press Enter to continue
to the next screen.

10.9. Spawn

This function spawns or shells you to DOS. A second copy of
COMMAND.COM is loaded into memory to process commands. You
may then enter DOS commands and do anything you can do at the
operating system level. Type 'EXIT' to return to the editor
exactly as you left it.

If you have a floppy-only system, COMMAND.COM must be avail-
able or the spawn will fail. Some versions of DOS prior to
3.x have a problem with "SHELL" and may not work properly.

pEDIT tries to keep 50-70k of memory free for the Spawn and
Dos commands; this will not leave sufficient memory for any-
thing but DOS resident commands (DIR, TYPE, etc.) and small
programs. If more memory is needed, use the eXtended Spawn
function (XSpawn).

10.10. XSpawn

This function serves the same purpose as Spawn but with one
important extension. All text memory is swapped out to disk,



- 31 -




leaving much more memory available to DOS. On a machine with
640k, about 350k will be freed up - more than enough to
compile and run other programs - even another copy of pEDIT.

The restrictions noted for Spawn apply here. Also, you must
be careful not to delete pEDIT's temporary swap files. See
the section titled 'Extended DOS Shell' for more information.

10.11. Repeat

Repeat lets you repeat any key press up to 32767 times. Only
the next single key press - typing, function, Ctrl, Alt - is
repeated.

The repeat count is shown by 'Repeat: ' on the message line.
Use BackSpace to correct the count; set the count to zero if
you wish to cancel.

You can end a repeat loop by pressing the Abort key.


10.12. Set Autosave

pEDIT has an 'autosave' function that automatically saves
your work to disk. If autosave is on, pEDIT will periodically
do a WriteFile if changes have been made. The 'Working . . .'
message will appear and the disk access light will come on.
You will be told how many lines were written. The usage is
'SET AUTOSAVE ON|OFF'.

10.13. Set Color

SetColor lets you choose foreground and background colors on
a color (CGA/EGA/VGA) monitor. For monochrome, the only legal
combinations are "SET COLOR blk wht" and "SET COLOR wht blk".
Here 'blk' and 'wht' refer to the mono colors whatever they
may be - black and white, black and green, etc.

The usage is 'SET COLOR fground bground'. See the Appendix
for a list of valid color code names.

10.14. Set Lines

SetLines lets you switch between 25 and 43 line mode on an
EGA or VGA monitor. These displays can show more than the
normal 25 lines of text. Note that screen writing and scrol-
ling are generally much slower in 43-line mode. The SetLines
command cannot be given when the screen is split. VGA 50 line
mode is not supported. The usage is 'SET LINES 25|43'.




- 32 -




10.15. Set Margins

This command lets you set left and right text margins. The
default margins are 1 and 80. The left margin must be greater
than zero and the right margin has to be greater than the
left. The usage is "SET MARGINS left right".

10.16. Set PIndent

Used to set the paragraph indent, i.e. the number of columns
by which to indent the first line of a paragraph. The usage
is "SET PINDNT nn" where nn is zero or a positve integer.

10.17. Set Scope

Specifies the "scope" for all Find and Replace operations. If
the scope is local, only the current buffer will be searched.
If the scope is global, all user buffers will be searched and
'Global' will show on the status line. The format of this
command is "SET SCOPE local|global".

Things can get out of hand if some buffers are searched in a
forward direction while others are searched in reverse. For
this reason, the direction for all buffers is temporarily set
to Forward during a global search.

10.18. Dos

The Dos function spawns or "shells" a command to DOS for
execution. The output from the command will be placed in the
DOS buffer as text. If only one window is on-screen, pEDIT
will split the screen and map the DOS buffer to the other
window.

A second copy of COMMAND.COM must be loaded into memory to
handle the request. See Spawn for a discussion of limitations
and cautions.

10.19. XDos

The eXtended DOS function (XDos) uses an intelligent DOS
shell to free up additional memory for the execution of DOS
commands. See the description of XSpawn and the section
titled 'Extended DOS Shell'.

A common use of XDos would be to compile a program from
within the editor. For example, 'XDOS BC TEST /O ;' would be
used to compile a QuickBASIC program. The compiler output
will of course be directed into the DOS buffer.



- 33 -




10.20. Help

The Help command provides full on-line help for every pEDIT
command. The editor looks for a help file named PEDIT.HLP in
the directory defined by the PEDIT environment variable, or
if none is defined, in the current directory.

You will be presented with a HELP window containing an alpha-
betical list of all pEDIT commands. Use the arrow keys to
highlight the command you want help with and press Enter. The
function can be cancelled by pressing Abort.

10.21. Keyboard

This function displays the contents of the file PEDIT.KEY on
the screen in a KEYBOARD window. The editor looks for this
file in the directory specified by the PEDIT environment
variable, or in the current directory. Normally this command
is used to display a diagram of your keyboard and/or a list
of the keys you have defined.

10.22. Ruler

Toggles an 80-column on-screen ruler on and off. The ruler
temporarily overwrites the status line.

10.23. Quit

Use the Quit command to abort an editing session. Abort MEANS
abort - any changes you have made will be lost. If any User
buffers have been modified, pEDIT gives you the option of not
quitting by displaying "Buffer(s) modified - quit (Y/N)? ".
Enter Y to abort, N to cancel the abort and resume editing.

10.24. Exit

The Exit command terminates the editing session and returns
you to DOS. The current buffer is automatically written to
disk if it has been modified. If any other user buffers have
been altered, pEDIT asks you one at a time if you want to
write them. Answer Y to save the buffer, N to skip it.











- 34 -




M A C R O F A C I L I T Y


1. Macro Types

pEDIT supports two different kinds of macros. The first
is a dynamic macro. The primary use of this type of macro (of
which there can be only one) is to automate one-time tasks.
If you find you are using the same stored keystrokes over and
over, the macro should be given a name and saved to disk.

The second type of macro is a disk macro. Start by set-
ting up a dynamic macro as above; experiment until you get it
working the way you want. Then, issue the Save Macro command
and pick a file name. The name must be a standard DOS file-
name of up to 8 characters. Do not include a file type; pEDIT
automatically adds the extension '.PMC'. If the macro file
already exists, you will be given a chance to overwrite the
file or abort.

Disk macros are used to automate things you do all of the
time. Let's say you do medical transcription and constantly
have to type in the phrase 'blood pressure'. Easy - define a
disk macro 'BP' to automatically enter the text for you.

Another use for disk macros is to extend the editor -
give it a capability it doesn't have. Two of the sample
macros provide something not built-in to pEDIT: the ability
to scroll the OTHER window up/down when the screen is split.


2. Macro Execution

A dynamic macro is invoked by issuing the command
'EXECUTE' without any parameters.

Disk macros are executed via 'EXECUTE filename' where
filename is the name the macro was saved under. Again, do not
specify a file type. pEDIT looks for the macro files in the
location specified by your environment variable PEDIT or in
the current directory.


3. Sample Macros

pEDIT is supplied with four sample macros which will be
installed under these names:

LETTER.PMC Sets the left margin to 10, the right



- 35 -




margin to 70 and the paragraph indent to
4 for a letter with 1" margins

OTHERUP.PMC Scrolls the other window up

OTHERDN.PMC Scrolls the other window down

WORDREV.PMC Moves one word in the reverse direction;
temporarily changes the buffer direction
to Reverse - so must start Forward










































- 36 -




E X T E N D E D D O S S H E L L


Version 1.75 of pEDIT introduced an intelligent DOS shell
which provides up to 350k of free memory on a 640k machine
when shelled to DOS. This means there is now enough memory to
complile from within pEDIT and to run large programs. The
eXtended functions XSpawn and XDos use this new method.

pEDIT does this by temporarily 'swapping' all text memory out
to disk and releasing the memory before calling DOS. When the
user types 'EXIT' to return to the parent program, the text
storage is reallocated and reloaded from these swap files.

pEDIT checks to make sure there is sufficient disk space to
hold the swap files. If not, the function will be cancelled.
It is very important that you not delete these swap files,
which are stored in the current directory with names of
PEDMEM?.TMP where ? = 0-4. pEDIT automatically deletes these
temporary files after they have been reloaded into memory.

Obviously it takes time to do the swapping; use the normal
Dos and Spawn functions if the extra memory isn't needed.





























- 37 -




C O M P I L I N G F R O M
p E D I T


Programs can be compiled from within pEDIT using the XDos
(eXtended DOS) function. There are several ways to handle the
compile. In all cases, the output will be placed in the DOS
buffer so you can see any errors.


1. Manual Invocation

The simplest method is to manually issue the command(s)
from within the editor. Unfortunately, a different command
line must be typed in for every source buffer so this can't
be easily automated. pEDIT now supports simple command sub-
stitution to translate

XDOS \QBASIC\BC % /S /O ;

to, for example,

XDOS \QBASIC\BC C:\BASIC\TEST /S /O ;

pEDIT will substitute the file name associated with the
current buffer less the file type. The file type (extension)
is not included because compilers and linkers typically use
the same file name but a different file type.


2. Batch File

Another method is to use a batch (BAT) file to perform
the compilation. This method requires some finagling because
the output from a BAT file cannot be redirected. Recall that
pEDIT uses a temporary PEDIT.TMP file to capture the output
from a shelled DOS command.

Following is a sample batch file to compile and link a
QuickBASIC program from pEDIT. Refer to the DOS manuals for
more information on batch commands and command substitution
using the parameters %1...%9. Note the use of the redirection
symbol >> which tells DOS to append the command output to the
specified file. This file MUST be named PEDIT.TMP.

ECHO OFF
IF EXIST %1.BAS GOTO Continue
ECHO No source file >>PEDIT.TMP
GOTO Exit
:Continue


- 38 -




IF EXIST %1.EXE DEL %1.EXE
BC %1.BAS /O ; >>PEDIT.TMP
LINK /EX /NOE %1.OBJ+QB.LIB,,,BCOM45.LIB ; >>PEDIT.TMP
DEL %1.OBJ
DEL %1.MAP
:Exit


3. Disk Macros

The most elegant way to compile is with pEDIT's new disk
macros. These macros can even be set up to automatically step
through the compile errors and position to every bad line in
the source file! This is quite impressive considering that no
macro language is used.

Only the general method will be outlined here. Sample
macros for compling under QuickBASIC are provided with the
optional pEDIT macroPAK which is described in the section
titled Add-Ons. Two macros are required here. The first does
the actual compilation and positions the DOS buffer to the
start of the latest compile statement. The second is used to
step through the errors.

The most difficult part of the second macro is locating
the errors! Compilers use different error indicators. A caret
(^) on one line is fairly common to point to the offending
part of a statement on the line above. Another problem is
that a single source line can generate several errors.
























- 39 -




E R R O R H A N D L I N G

If an error occurs, pEDIT will bring up an ERROR window
and alert you to one of the following problems.


1. Insufficient Internal Storage

When pEDIT is first started it checks to see how much
free memory is available. This determines the maximum number
of lines and characters of text it can handle. pEDIT informs
you whenever 99% of either of these values is reached and
advises you to "Save your work and exit". You can continue to
work; however, you will get the warning *every* time text is
added. If you ignore the warnings and exceed the allocated
space, the program will abort.

There is no recovery from this other than to exit (be
sure to save your files!) and start over. pEDIT presently
cannot free up memory once it has been allocated.


2. Insufficient Disk Space

pEDIT checks for sufficient disk space BEFORE starting a
file save operation. If this does happen, you will be advised
to "Increase available space on current drive or change file
specification via RenameFile".

The text is still in memory and has not been lost; how-
ever, it has not yet been saved to disk. If possible, Spawn
out to DOS and delete some files to free up space. Or, switch
to a different diskette that has more room. Or, use "RENAME
FILE" to change to another drive; if the current file is
A:MYFILE.TXT, save the file as B:MYFILE.TXT.


3. No Initialization File

pEDIT requires a file named PEDIT.INI for proper oper-
ation. If this file does not exist, it means that pEDIT has
not been properly installed. Refer to the section 'Installing
pEDIT' for details on how to run the INSTALL procedure.

If no init file can be found, pEDIT will invoke a minimal
default configuration so you can communicate with the editor.
The colors are set to white on blue, and the labelled keys
such as the cursor keys, Ins, Del, PgUp, PgDn are bound to
their exspected functions. Finally, the Esc key is defined as
DoCommand.


- 40 -




M I S C E L L A N E O U S
L E G A L I T I E S


1. Copyright Notice

This document, other accompanying written and disk-based
specifications, and all referenced and related program files
are copyrighted by T. G. Muench.

IBM and PC-DOS are registered trademarks of International
Business Machines Corporation. MS-DOS and QuickBASIC are
trademarks of Microsoft Corporation. WordStar is a registered
trademark of MicroPro International Corporation.


2. Disclaimer and Warranty

pEDIT IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL WARRANTIES,
EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE
WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE.
THE AUTHOR ASSUMES NO LIABILITY FOR DAMAGES, DIRECT OR CON-
SEQUENTIAL, WHICH MAY RESULT FROM THE USE OF pEDIT.


3. Registration

pEDIT is a "shareware program" and is provided at no
charge to the user for evaluation. Feel free to share it with
your friends, but please do not give it away altered or as
part of another system. The essence of "user-supported"
software is to provide personal computer users with quality
software without high prices, and yet to provide incentive
for programmers to continue to develop new products. If you
find this program useful and find that you are using pEDIT
and continue to use pEDIT after a reasonable trial period,
you must make a registration payment of $25 to T. G. Muench.

Commercial users of pEDIT must register and pay for their
copies of pEDIT within 30 days of first use or their license
is withdrawn. Site-License arrangements may be made by
contacting T. G. Muench.

Anyone distributing pEDIT for any kind of remuneration
must first contact T. G. Muench at the address below for
authorization. This authorization will be automatically
granted to distributors recognized by the (ASP) as adhering
to its guidelines for shareware distributors, and such
distributors may begin offering pEDIT immediately. However,
T. G. Muench must still be advised so that the distributor


- 41 -




can be kept up-to-date with the latest version of pEDIT.

You are encouraged to pass a copy of pEDIT along to your
friends for evaluation. Please encourage them to register
their copy if they find that they can use it. All registered
users will receive, on 5.25" DSDD disk, the latest version of
pEDIT (without the opening/ending shareware 'beg' screen),
a printed manual, telephone support, FREE utilities and one
FREE upgrade.

Your comments and suggestions are welcomed by writing to
the author at the address given below. Written communications
ONLY will be accepted from non-registered users. Be sure and
reference the version number of your copy of pEDIT (use the
SHOW BUFFER command).

To register, complete the registration form included in
the disk file REGISTER.DOC. Then, print it and mail it with
$25 to:

T. G. Muench
P.O. Box 11536
Prescott, AZ 86304-1536


4. Association Of Shareware Professionals

This program is produced by a member of the Association
of Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road, Muskegon MI 49442 or send a CompuServe message
via CompuServe Mail to ASP Ombudsman [70007,3536].


5. The Author

Like many people who ended up working on computers, T. G.
(Terry) Muench started elsewhere. He has a Master's degree in
Chemistry and worked for Dow Chemical Co. after college. He
got out of this dangerous profession after 4 years and moved
to Prescott, Arizona where he took a job as a computer oper-
ator trainee at a junior college.

After 4 years he was forced to leave Prescott to find a
living wage. He worked as a Programmer/Analyst on (mostly)


- 42 -




DEC hardware and later became VAX Systems Manager for a large
Southwestern bank. He again 'gave it all up' after 10 years
of aggravation and stress and has returned to Prescott.

The author has been involved with micros since CP/M days.
He has owned a Kaypro, a PC-XT clone and now a PC-AT clone.
He would like to have a 386(SX) but can't afford one unless
you people start registering!

T. G. is married and has no children. His hobbies are
moving around and building houses which he later sells for a
loss.








































- 43 -




A D D - O N P R O D U C T S


Macro utilities and several sample macros come with the
new pEDIT macroPAK. This $10 add-on has programs to convert
macro files between pEDIT's internal binary format and
editable text files containing key names and commands. This
gives the pEDIT user 'almost' a macro language.

Please be aware that the macroPAK is *NOT* required to
use pEDIT's disk macros. You can use the macro recording
(Learn and Remember) and saving (Save Macro) commands
outlined in this document. The macroPAK is designed to let
you edit existing macros and create new ones without using
the built-in commands.

The pEDIT macroPAK is composed of the following utility
programs:

PMC2ASC - converts from binary to Ascii; used to trans-
late a PMC file into Ascii so macros can be
edited

ASC2PMC - performs the opposite function; translates
an ASC file back to a binary PMC file

These utilities work by loading in your customized init
file (PEDIT.INI) and translating keystrokes to pEDIT
commands. As an example, suppose you wanted to define a macro
called PAGE to insert a form feed at the current cursor
position. You would create an Ascii text file PAGE.ASC
containing:

{Quote_Char}

Running this file through ASC2PMC would convert the
literal {Quote_Char} to the binary code for the key you have
defined for this command. The result would be a binary pEDIT
macro PAGE.PMC which can be used by the editor. Naturally,
both procedure names and key names are the same ones you use
in your pEDIT.INI file. Procedure names are enclosed in
squiggly brackets {} while key names use angle brackets <>.

These programs make it easy to modify existing macros
without having to start from scratch.

Several sample disk macros are included with the pEDIT
macroPAK. Among these are QBCOMP1 and QBCOMP2 which compile a
QuickBASIC program and step through the errors.



- 44 -




A P P E N D I C E S

A. Key Bindings

1. Labelled Keys

Many of the labeled keys on the PC keyboard are bound to
functions common to all configurations. The function bound to
these keys corresponds to the key name. Keys marked with (*)
cannot be redefined.


BackSpace Erase Prev(*)
Tab Insert Char(*)
Enter Insert Char(*)

Home Move Home
End Move End
Pgup Prev Screen
Pgdn Next Screen
Up Move Up
Down Move Down
Left Move Left
Right Move Right

Ctrl-Enter Auto Indent


























- 45 -




A P P E N D I C E S

A. Key Bindings

2. WordStar


Esc Do Command

F01 Help
F02
F03 Findnext
F04
F05 Change Mode
F06 Change Dir
F07 Learn
F08 Repeat
F09
F10
F11 Store Text
F12

Ins Change Mode
Del Erase Char
Ctrl-Home Move Top
Ctrl-End Move End
Ctrl-Left Shift Left 40
Ctrl-Right Shift Right 40
Ctrl-Pgup Execute Otherup
Ctrl-Pgdn Execute Otherdn

Alt-1 One Window
Alt-2 Two Windows
Alt-A Abort
Alt-B Buffer
Alt-C Capital Word
Alt-D Dos
Alt-H Keyboard
Alt-K Define Key
Alt-L Lower Word
Alt-O Other Window
Alt-P Set PIndent
Alt-Q Quit
Alt-R Remember
Alt-S Set Scope
Alt-T Trans Char
Alt-U Upper Word
Alt-X Execute




- 46 -




Ctrl-A Execute Wordrev
Ctrl-B Fill Paragraph
Ctrl-C Next Screen
Ctrl-D Move Right
Ctrl-E Move Up
Ctrl-F Move Word
Ctrl-G Erase Char
Ctrl-L Findnext
Ctrl-N Open Line
Ctrl-P Quote Char
Ctrl-R Prev Screen
Ctrl-S Move Left
Ctrl-T Erase Word
Ctrl-U Restore Text
Ctrl-V Change Mode
Ctrl-X Move Down
Ctrl-Y Erase Line

Ctrl-K+B Select Text
Ctrl-K+C Insert Here
Ctrl-K+D Get File
Ctrl-K+F Rename File
Ctrl-K+Q Quit
Ctrl-K+R Include File
Ctrl-K+S Write File
Ctrl-K+U Select Text
Ctrl-K+Y Remove Text
Ctrl-K+X Exit

Ctrl-Q+A Replace
Ctrl-Q+C Move Bottom
Ctrl-Q+D Move End
Ctrl-Q+F Find
Ctrl-Q+I Line
Ctrl-Q+P Goto Mark
Ctrl-Q+R Move Top
Ctrl-Q+S Move Home
Ctrl-Q+Y Erase Line

Ctrl-O+C Center Line
Ctrl-O+L Set Margins
Ctrl-O+R Set Margins










- 47 -




A P P E N D I C E S

A. Key Bindings

3. Emacs


Esc+Esc Do Command

F01 Help
F02
F03 Findnext
F04
F05 Change Mode
F06 Change Dir
F07
F08
F09 Restore
F10
F11 Store Text
F12

Ins Change Mode
Del Erase Char
Ctrl-Home Move Top
Ctrl-End Move End
Ctrl-Left Shift Left 40
Ctrl-Right Shift Right 40
Ctrl-Pgup Execute Otherup
Ctrl-Pgdn Execute Otherdn

Alt-F Fill Paragraph
Alt-H Keyboard
Alt-K Define Key
Alt-M Set Margins
Alt-P Set PIndent
Alt-Q Quit
Alt-R Replace
Alt-S Set Scope

Ctrl-A Move Home
Ctrl-B Move Left (backwards)
Ctrl-C Spawn
Ctrl-D Erase Char
Ctrl-E Move End
Ctrl-F Move Right (forward)
Ctrl-G Abort
Ctrl-H =BackSpace
Ctrl-I =Tab
Ctrl-J =Ctrl-Enter


- 48 -




Ctrl-K Erase Line (kill line)
Ctrl-L Refresh Screen
Ctrl-M =Enter
Ctrl-N Move Down (next line)
Ctrl-P Move Up (previous line)
Ctrl-S Find (search)
Ctrl-T Trans Char
Ctrl-U Repeat (universal)
Ctrl-V Next Screen
Ctrl-W Remove Text (wipe)
Ctrl-Y Insert Here (yank)
Ctrl-Z Exit

Esc+. Select Text
Esc+< Move Top
Esc+> Move Bottom
Esc+B Execute Wordrev (word back)
Esc+C Capital Word
Esc+D Erase Word
Esc+F Move Word (word forward)
Esc+L Lowercase Word
Esc+U Uppercase Word
Esc+V Prev Screen

Ctrl-X+( Learn (start macro)
Ctrl-X+) Remember (end macro)
Ctrl-X+1 One window
Ctrl-X+2 Two windows
Ctrl-X+B Buffer
Ctrl-X+E Execute (macro)
Ctrl-X+N Other window (next window)
Ctrl-X+P Other window (previous window)
Ctrl-X+Ctrl-B List buffers
Ctrl-X+Ctrl-C Quit
Ctrl-X+Ctrl-R Include file (read file)
Ctrl-X+Ctrl-S Write file (save file)
Ctrl-X+Ctrl-V Get file (visit file)
Ctrl-X+Ctrl-W Rename file (write file)














- 49 -




A P P E N D I C E S

A. Key Bindings

4. Standard and Alternate


Key Name STANDARD Config. ALTERNATE Config.
-------- ---------------- -----------------

Esc Do Command Do Command

F01 Help Find
F02 Buffer Move Word
F03 Findnext Findnext
F04 Other Window Erase Word
F05 Restore Text Change Mode
F06 Change Dir Change Dir
F07 Learn Learn
F08 Repeat Repeat
F09 Quit Restore Text
F10 Write File Write File
F11 Store Text Store Text
F12

Ins Change Mode Insert Here
Del Erase Char Remove Text
Ctrl-Home Move Top Move Top
Ctrl-End Move End Move End
Ctrl-Left Execute Wordfwd Shift Left 20
Ctrl-Right Execute Wordrev Shift Right 20
Ctrl-Pgup
Ctrl-Pgdn

Alt-A
Alt-B Buffer
Alt-C Capital Word Capital Word
Alt-D Remove Text
Alt-E
Alt-F Fill Paragraph Fill Paragraph
Alt-G Get File Get File
Alt-H Keyboard Help
Alt-I Include File Include File
Alt-J
Alt-K Define Key Define Key
Alt-L Lower Word Lower Word
Alt-M Set Margins Set Margins
Alt-N
Alt-O Other Window
Alt-P Insert Here


- 50 -




Alt-Q Quit Quit
Alt-R Replace Replace
Alt-S Select Text Select Text
Alt-T Trans Char Trans Char
Alt-U Upper Word Upper Word
Alt-V
Alt-W Move Word Move Word
Alt-X
Alt-Y
Alt-Z
Alt-1 One Window One Window
Alt-2 Two Windows Two Windows

Ctrl-A
Ctrl-B Recall Recall
Ctrl-C Abort Abort
Ctrl-D Erase Word Erase Char
Ctrl-E
Ctrl-F Find
Ctrl-G Set Scope Global Set Scope Global
Ctrl-H =BackSpace =BackSpace
Ctrl-I =Tab =Tab
Ctrl-J =Ctrl-Enter =Ctrl-Enter
Ctrl-K Erase Line Erase Line
Ctrl-L Set Scope Local Set Scope Local
Ctrl-M =Enter =Enter
Ctrl-N
Ctrl-O Open Line Open Line
Ctrl-P Set PIndent Set Pindent
Ctrl-Q
Ctrl-R Remember Remember
Ctrl-S
Ctrl-T
Ctrl-U
Ctrl-V Quote Char Quote Char
Ctrl-W Refresh Screen Refresh Screen
Ctrl-X
Ctrl-Y
Ctrl-Z Exit Exit














- 51 -




A P P E N D I C E S

B. The DOS Environment

Most PC users are familiar with the DOS PATH command. A
statement of the form

PATH C:\;C:\DOS\;C:\PEDIT

in your AUTOEXEC file tells DOS where to look for programs
and batch files. Unfortunately, the DOS environment is a
mystery to most.

Environment variables are defined using the SET command.
SET by itself displays a list of all defined variables while
a command of the form 'SET NAME=VALUE' defines a variable.
Programs can read these defined environment variables and get
access to the equivalence value. A common use is to tell a
program where needed files are located. This is what pEDIT
needs to know. Adding the line:

SET PEDIT=C:\PEDIT

to your AUTOEXEC.BAT file lets pEDIT find its init, help and
key files no matter what device/directory you are in. Note
that only a device and directory are specified. This is dif-
ferent from previous versions of pEDIT where each file had a
separate variable. Obviously, this method saves environment
space.

DOS allocates only a relatively small amount of memory
for the environment and it is possible to exceed this. The
error is 'Out of environment space' while booting. If this
happens and you have DOS 3.1 or higher, add the following
line to your CONFIG.SYS file:

SHELL=C:\DOS\COMMAND.COM C:\DOS /E:256 /P

and reboot. Substitute your device and path in place of
C:\DOS. Here, the /E:256 tells DOS to reserve 256 bytes of
environment space.











- 52 -




A P P E N D I C E S

C. Initialization File

pEDIT requires an initialization file named PEDIT.INI.
This file must be available to pEDIT either through trans-
lation of the DOS environment variable PEDIT or be located in
the current directory.

Four sample initialization files are included with the
editor:

WordStar the first PC word processor; many people
know the WordStar keys plus lots of soft-
ware uses it, too

Emacs the famous UNIX programmer's editor; uses
mnemonics, i.e. Ctrl-F = forward, Ctrl-B
= backwards

Standard Attempts to conform to the so-called PC
standard where F01 = Help, etc.

Alternate The original pEDIT configuration.

A pEDIT initialization file is a simple Ascii text file
containing any of the following commands: DEFINE_SHIFT(),

DEFINE_KEY() and SET(). Note the underscore between words and
the parentheses. The commands can be uppercase, lowercase or
mixed. The editor ignores blank lines and treats anything
after an exclamation point as a comment.

Unlike other editors, pEDIT uses English key names. You
don't have to worry about remembering what '@' and '#' stand
for. pEDIT uses the prefixes shown on your keyboard: Alt and
Ctrl.

DEFINE_SHIFT is used to define a shift or 'lead-in' key
and tells pEDIT that the key will be the first key of a multi-
key command. DEFINE_SHIFT(Ctrl-Q) sets up Control-Q as one of
WordStar's lead-in keys. The shift keys should be defined at
the top of the init file before any key definitions that use
that shift key.

DEFINE_KEY defines a key to pEDIT when the editor is
invoked. Obviously, no one would want to have to define every
key every time they wanted to edit something. The statement
DEFINE_KEY (Alt-G, Get_File) binds the key named Alt-G to the
procedure GetFile. A plus sign (+) between two key names
indicates a two key command. DEFINE_KEY(Ctrl-Q+F) defines


- 53 -




WordStar's find command: a Control-Q followed by an F.

SET is used to define the editing environment. If you
wanted pEDIT to always come up in color using blue on a white
back-ground, you would include SET (COLOR, BLU, WHT) in the
init file. This would be the same as entering the command
"SET COLOR Blu Wht" from within pEDIT.

Of course, you don't have to use the initialization files
supplied with the editor. You can set up any keyboard mapping
you want.


D. Help File

The Help file PEDIT.HLP is required if you want to use
the Help function. This file can also be modified by the
user. However, there is one important restriction: the file
must contain fixed 78-byte records. The editor uses random
file access to read the help file so it must be made up of
fixed-length records.

You can customize the help file as long as you keep each
record's length at exactly 78 bytes by 'padding' with spaces.
You will want to limit each command's text to 20 lines (one
screenful) of text. If you look at the file you will that see
each command starts with two carets plus the command name in
caps - for example "^^MOVE UP".


E. Keyboard Help File

The editor uses the optional file PEDIT.KEY for the Key-
board command. When this command is invoked, pEDIT displays
the contents of PEDIT.KEY in a KEYBOARD window. As always,
this file must be available through the DOS environment or be
in the current directory.

pEDIT comes with four sample keyboard files corresponding
to the 4 initialization files listed above.












- 54 -




A P P E N D I C E S

F. Color Codes


BLK Black
BLU Blue
GRN Green
CYN Cyan
RED Red
MAG Magenta
BRN Brown
WHT White
GRY Grey
LBL Light Blue
LGR Light Green
LCY Light Cyan
LRD Light Red (Pink)
LMG Light Magenta
YEL Yellow
BWH Bright White


The light colors are sometimes called 'bright'





























- 55 -



  3 Responses to “Category : Word Processors
Archive   : PEDIT210.ZIP
Filename : PEDIT.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/