intro 001815
multiwindow 003084
promptsmenus 003454
usinghelp 003981
menu 004317
editor 005200
cursorcommands 005749
enter 006598
textmanip 007335
insbracepair 008432
insclosingbrace 009036
filemenu 009616
filecommands 009921
fileclsall 010817
fileopntxt 011494
openspec 011957
edtdirwin 012533
opnfilnam 013044
fileread 013474
xio_nmipmt 013747
filewrite 014094
xio_nmopmt 014541
pickfile 015145
fileprint 015611
fileprintpg 015834
windowmenu 016399
windowcommands 016690
zoommode 017556
hiddenwindows 018083
lockedwindows 018686
nextunlocked 019674
status 020019
statusflags 020690
insmode 021513
paraformat 022190
autoblankline 023061
autoindent 023818
autoindentsafe 024550
smartindent 025159
smartindentlogic 026042
toggleoptions 027254
ctrl_x 027866
searchmenu 028551
searchcommands 028855
searchwordstring 029680
cutpastemenu 030103
cutpastecommands 030481
cutpasteall 031039
cutpaste_del 031729
cutpaste_mov 031962
cutpaste_cpy 032252
cutpaste_eol 032552
markcommands 033574
markdisplay 034620
markunique 034986
markline 035599
markchar 036518
markcursormove 036965
markclearall 037711
miscmenu 038043
paramargins 038536
configfiles 038804
configop_path 039624
configop_pagelength 040006
configop_controlindent 040443
configop_braceindent 040794
kcdfile 041109
kcdline 041969
kcdkeyname 043007
kcdenter 043808
cmdlinopts 044506
filepath 045565
sessionfiles 046672
searchfiles 047693
configoptions 048698
setcnfpthg 049224
setcnfpthl 049455
dosshell 049722
settingmenu 050362
editsettings 050594
editset_autopfmt 051322
blockmenu 051711
blockedit 051933
block_adjlines 053088
block_inscol 053610
block_delcol 053894
block_write 054166
block_append 054868
block_white 055076
block_last 055299
autoindentmenu 055510
$
$intro 01 19 18 62 Introduction
002378 18 01 19
02 10 15 01 we multiwindow
02 26 19 01 we editor
06 27 13 01 we menu
07 19 20 01 we ctrl_x
09 05 24 01 we cursorcommands
09 37 18 01 we status
10 05 26 01 we textmanip
10 37 19 01 we configfiles
11 05 27 01 we searchcommands
11 37 20 01 we cmdlinopts
12 05 24 01 we filecommands
12 37 19 01 we kcdfile
13 05 26 01 we windowcommands
13 37 17 01 we promptsmenus
14 05 22 01 we cutpastecommands
14 37 10 01 we usinghelp
15 05 22 01 we blockedit
16 05 22 01 we editsettings
17 05 22 01 we miscmenu
The Willow Creek Programmer's Editor (WE) is a powerful and
flexible multiple window programmer's editor.  It can also be
used as a simple word processor.  Further help is available on
the following:

                 ESC key: The Main menu
                  Special key commands

    Cursor movement commands        Window status line
    Text manipulation commands      Configuration files
    Search and replace commands     Command line options
    File management commands        Key definition file
    Window management commands      Prompts and menus
    Cut and paste commands          Using help
    Block editing commands
    Edit settings commands
    Miscellaneous commands

$multiwindow 01 03 04 65 Multiple Windows
003217 04 01 03
02 36 15 01 we filecommands
03 01 09 01 we menu
04 24 20 01 we ctrl_x
WE can open several editing windows at once, each with a
different file loaded in it.  The "File management" option on the
Main menu lists commands to do this.  Many of these commands are
also available through special key commands.
$promptsmenus 01 00 12 64 Using Prompts and Menus
003522 12 00 00
Prompts and menus are pretty self explanatory to use.

On prompts just type in what it asks for, and press ENTER.  The
same editing keys work as when entering text in a window, with
one exception: To delete from the cursor to the end in a prompt
use ^Y instead of ^E.

On menus use the arrow keys and ENTER, or push the highlighted
hot key for the option you want.

On both use the ESC key to quit from that prompt or menu without
doing anything.
$usinghelp 01 00 08 63 Using Help
004033 08 00 00
Using help is very simple, and intuitively obvious.  A few
comments, however.

Use the up and down arrow keys to move between highlighted
"footnotes" - hypertext links.  The left and right arrows don't
do anything in help.

The F1-F4 keys always display WE introductory help.
$menu 01 08 16 64 Main Menu
004573 16 01 08
04 18 18 01 we searchmenu
05 18 15 01 we filemenu
06 18 17 01 we windowmenu
07 18 13 01 we cutpastemenu
08 18 18 01 we blockmenu
09 18 18 01 we settingmenu
10 18 13 01 we miscmenu
16 26 10 01 we ctrl_x
The Main menu contains the following options.  Each option will
display a sub-menu of options related to the named topic.

                 Search and replace
                 File management
                 Window management
                 Cut and paste
                 Block manipulation
                 Edit mode settings
                 Miscellaneous

To display the Main menu push the ESC key while editing.

When an option on a sub-menu includes a notation like (^Q) or
(^X+^O) at the end of the line that means that the option may be
also selected by pushing those keys without accessing the menu.
$editor 01 00 09 65 Programmer's Editor
005258 09 00 00
WE is an editor for ASCII text files.  It is designed to be most
useful for writing and modifying programs.  It does not have a
special "internal" format for its files like a word processor, it
works directly on "raw" ASCII text files like DOS batch files and
program source code files.

While WE does not have all the features of a real word processor,
it has enough features for writing simple notes and things.  For
instance, it will format paragraphs using margins you specify.
$cursorcommands 01 02 18 65 Cursor Movement Commands
005873 18 01 02
05 14 43 01 we enter
17 29 32 01 we searchcommands
The following commands will move the cursor inside a window, or
scroll the window while keeping the cursor in the same place:

     Arrows: Move cursor left, right, up, and down
      Enter: Move cursor to next line or create new line
       Home: Move to beginning of line
        End: Move to end of line
       PgUp: Previous page
       PgDn: Next page
  Ctrl/Home: Beginning of file
   Ctrl/End: End of file
  Ctrl/Left: 8 columns to left
 Ctrl/Right: 8 columns to right
         ^Z: Scroll text up (cursor doesn't move)
         ^W: Scroll text down (cursor doesn't move)

There is also a full set of text search and replace commands that
will move the cursor to the location of text they search for.
$enter 01 04 13 65 The Enter Key
006759 13 01 04
05 05 18 01 we settingmenu
06 01 41 01 we autoblankline
08 04 14 01 we autoindent
11 05 19 01 we kcdenter
The ENTER key can be configured to act in different ways.  The
normal action is to move the cursor to the beginning of the next
line, and to add a new line when used at the last line of a file.

The Edit Settings menu has an option to force the ENTER key to
add a blank line below the cursor instead.

If auto indenting is turned on then the cursor will automatically
indent the line where it ends up.

The key definition file can also be used to reconfigure the ENTER
key to act in slightly different ways when not overridden by the
"add blank line below" mode.
$textmanip 01 07 20 63 Text Manipulation Commands
007585 20 01 07
02 36 19 01 we blockedit
03 05 18 01 we miscmenu
12 15 18 01 we paraformat
13 30 30 01 we insmode
14 08 05 01 we enter
18 36 14 01 we autoindent
20 29 32 01 we searchcommands
The following commands are used to manipulate text.  There are
also some commands that work on an entire marked block of text.
The Miscellaneous menu also has some options for manipulating
text.

         DEL: Delete character at cursor
   Backspace: Delete previous character
          ^R: Delete (remove) entire line
          ^E: Delete from cursor to end of line
          ^B: Break line into two lines at cursor
          ^A: Append line below onto current line
          ^P: Reformat paragraph
         INS: Switch between text insert and typeover modes
       Enter: Go to next line (maybe adding new line)
  Ctrl/Enter: Insert blank line above the cursor
 Shift/Enter: Insert blank line below the cursor

All the ENTER key commands can use auto indenting.

There is also a full set of text search and replace commands.
$insbracepair 01 03 09 65 Insert Brace Pair
008586 09 01 03
02 17 11 01 we configop_braceindent
02 45 18 01 we configfiles
08 18 14 01 we autoindent
This command (^X+^P) will indent the current line by the amount
defined by the "braceindent" command in the configuration file,
and then insert a pair of lines above and below it with opening
and closing braces at the original indent of the line.  The
cursor is left at the new indent in the original line.

This command will work equally well on a blank line with an
indent set up by auto indenting and on an existing line with text
on it.
$insclosingbrace 01 03 09 65 Insert Closing Brace
009196 09 01 03
02 17 11 01 we configop_braceindent
02 45 18 01 we configfiles
08 18 14 01 we autoindent
This command (^X+^C) will indent the current line by the amount
defined by the "braceindent" command in the configuration file,
and then insert a line below it with a closing brace at the
original indent of the line.  The cursor is left at the new
indent in the original line.

This command will work equally well on a blank line with an
indent set up by auto indenting and on an existing line with text
on it.
$filemenu 01 02 03 64 File Management Menu
009727 03 01 02
01 35 08 01 we filecommands
03 55 09 01 we menu
The File Management menu contains commands to open and close
windows, read and write disk files, print, and change the MS-DOS
directory.  The File Management menu is listed on the Main menu.
$filecommands 01 09 16 64 File Management Commands
010222 16 01 09
02 28 20 01 we filemenu
03 06 20 01 we ctrl_x
05 08 11 01 we openspec
06 30 15 01 we fileopntxt
10 08 26 01 we fileclsall
11 08 38 01 we filewrite
12 08 31 01 we fileread
13 08 10 01 we fileprint
14 08 26 01 we fileprintpg
The following file management commands are available.  All these
commands are listed on the File Management menu, and some are
also special key commands.

       Open window and load file (^X+^O)
       Open window with file named at cursor (^X+^N)
       Close window and save file
       Save file and continue editing (^X+^S)
       Quit window without saving file (^X+^Q)
       Close all windows and exit
       Write marked lines out to another file
       Read lines in from another file
       Print file
       Print file with pagination
       Change MS-DOS directory

$fileclsall 01 03 12 64 Close All Windows and Exit
010967 12 01 03
01 19 20 01 we filemenu
09 23 12 01 we sessionfiles
12 27 12 01 we cmdlinopts
The option on the File Management menu to "Close all windows and
exit" will do exactly that - close all editing windows and leave
WE.

If the file in a window has been modified but not saved, WE will
display a message saying so and asking if you want to save the
file.

WE will also create a session file called "WE.SES" which lists
all the files that were open when the "Close all..." command was
selected.  This session file is used by WE if a "@" with no file
name after is used on the command line invoking WE.
$fileopntxt 01 02 06 65 Open File Name Imbedded in Text
011618 06 01 02
02 05 20 01 we filemenu
03 42 12 01 we openspec
The option to "Open window with file named in text", (^X+^N), on
the File Management menu, will try to use the text at the cursor
in the current window as the name of the file to open.  This lets
you "point and shoot" to look at files in directory listings,
output files from file search utilities, compiler error message
logs, etc.
$openspec 01 03 09 65 File Specs and Directory Windows
012108 09 01 03
03 09 16 01 we pickfile
07 14 33 01 we fileopntxt
09 21 14 01 we edtdirwin
Whenever WE uses a file spec to open a window it checks to see if
the name contains a wildcard or is a directory.  If so, then WE
opens a directory window containing all files matching the
wildcard, and lets you select the file you want.

This feature operates both when WE prompts for a file name, and
when using a file name imbedded in window text.

WE can also open an editing window with a directory list in it.
$edtdirwin 01 01 07 62 Directory in Editing Window
012629 07 01 01
06 33 13 01 we fileopntxt
If WE attempts to open a window using a wildcard prefixed by a
"#" character, it will open an editing window containing a
directory listing of all files matching the wildcard after the
"#".  By "editing window" we mean a normal window you can move
around in, search, change, etc.  It is very handy to browse
through this window and use the ^X+^N command to point to file
names and open windows to edit them.
$opnfilnam 01 03 05 65 Enter File Name
013177 05 01 03
02 08 19 01 we filepath
03 16 14 01 we pickfile
04 09 24 01 we edtdirwin
Enter the name of a file to load into the new window.  WE will
search several directories to find the file.  If a wildcard is
entered then a directory list is displayed for you to pick from.
Enter a wildcard prefixed by "#" to open an editing window with a
directory listing in it to browse.
$fileread 01 02 03 65 Read Lines in From Another File
013598 03 01 02
01 21 20 01 we filemenu
01 47 19 01 we xio_nmipmt
This command on the File Management menu will prompt for the name
of an ASCII text file to insert into the current window at the
cursor position.
$xio_nmipmt 01 03 04 65 Enter File Name
013880 04 01 03
01 29 21 01 we fileread
02 25 19 01 we filepath
03 30 14 01 we pickfile
Enter the name of a file to read in at the cursor in the current
window.  WE will search several directories to find the file.  If
a wildcard is entered then a directory list is displayed for you
to pick from.
$filewrite 01 02 07 65 Write Marked Lines Out To Another File
014226 07 01 02
01 21 20 01 we filemenu
01 47 19 01 we xio_nmopmt
This command on the File Management menu will prompt for the name
of an ASCII text file to write out all marked lines from the
current window to.

This command will write out the entire line if any part of it is
marked.  It is not like cut and paste commands that work with
only the letters that are marked.
$xio_nmopmt 01 03 09 65 Enter File Name
014675 09 01 03
01 21 34 01 we filewrite
03 28 19 01 we filepath
07 39 14 01 we pickfile
Enter the name of a file to write out all marked lines from the
current window to.  Unlike file name prompts for files to read,
the name entered here will NOT be searched for in other
directories.  If no directory is included in the name then it
will be written in the current MS-DOS directory.

You may enter a wildcard to display a directory list matching
that wildcard.  You can either select one of those files to write
to, or enter the name of a new file.
$pickfile 01 00 10 64 Directory List Window
015207 10 00 00
Use the arrow keys and "Enter" to select a file.  You can also
use "PgUp" and "PgDn" to move a page at a time through the list.
If you pick a directory name from the list WE will pop up a new
window with that directory in it.  The following function keys
are available:

       F2 - Enter a new wildcard.
       F3 - Enter a new directory name.
       F4 - Enter the name of a file to create.

$fileprint 01 01 03 62 Print File
015688 03 01 01
01 21 20 01 we filemenu
This command on the File Management menu will print the entire
contents of the current window to printer LPT1:.  The file is
printed verbatim.
$fileprintpg 01 03 08 65 Print File with Pagination
015993 08 01 03
01 21 20 01 we filemenu
05 05 10 01 we configop_pagelength
05 30 18 01 we configfiles
This command on the File Management menu will print the entire
contents of the current window to printer LPT1: and insert a page
number at the bottom of each page.  The default page length is 66
lines, but this can be changed (usually for laser printers) with
the pagelength option in the configuration file.

You will be prompted for the indent from the left margin to use
when printing the file.
$windowmenu 01 02 03 64 Window Management Menu
016516 03 01 02
01 37 08 01 we windowcommands
03 34 09 01 we menu
The Window Management menu contains commands to control the size
and other characteristics of the editing windows.  The Window
Management menu is listed on the Main menu.
$windowcommands 01 06 17 65 Window Management Commands
016927 17 01 06
02 28 22 01 we windowmenu
03 01 20 01 we ctrl_x
09 09 09 01 we zoommode
10 09 11 01 we hiddenwindows
11 09 11 01 we lockedwindows
12 09 25 01 we nextunlocked
These commands are used to manipulate editing windows.  All these
commands are listed on the Window Management menu.  Many are also
special key commands.

        Go to next window (F6)
        Go to previous window (Shift/F6)
        Remember current window
        Go back to remembered window
        Zoom mode on/off (^X+^Z)
        Hide/unhide window when not zoomed (^X+^H)
        Lock/unlock window on screen (^X+^L)
        Show next unlocked window (^X+^U)
        Unhide/unlock all windows
        Increase window size (F5)
        Decrease window size (Shift/F5)
        Make all windows equal size

$zoommode 01 01 10 65 Zoom Mode
017629 10 01 01
10 25 11 01 we status
When WE is in "zoom" mode only the current window will be
displayed, and it will be expanded to take up the entire screen.
The unzoomed sizes of the windows are not lost, and will be
restored when zoom mode is turned off.

Zoom mode is turned on and off with the ^X+^Z command.

You will know WE is in zoom mode when the current window takes up
the whole screen, and the "(Z)" indicator appears next to the
window file name in the status line.
$hiddenwindows 01 02 09 65 Hidden Windows
018191 09 01 02
02 47 09 01 we zoommode
08 25 11 01 we status
When a window is marked as "hidden" with the ^X+^H command it
will not appear on the screen unless WE is in zoom mode and the
hidden window is the current window.  You will have to use F6 or
a similar command to search through the windows to find the
hidden window after switching to zoom mode.

Hidden windows are marked with an "(H)" indicator next to the
window file name in the status line when you look at them in zoom
mode (which is the only time you will see them, of course...)
$lockedwindows 01 02 18 65 Locked Windows
018798 18 01 02
04 01 11 01 we status
14 32 25 01 we nextunlocked
When window(s) are "locked" onto the screen they remain in place
while "unlocked" windows take turns being displayed in whatever
screen space is left over.  Locked windows display "(L)" in the
status line.

Locked windows are useful when you have one or two windows you
are actively working on, and a list of other windows that you are
only looking at occasionally for reference.  This keeps the
screen from becoming cluttered with too many windows.

To set up locked windows first "unzoom".  Then open at least one
of the files you won't want to lock.  This is to hold space on
the screen for unlocked windows.  Then lock the windows you want
with ^X+^L.  Then use ^X+^U to show each unlocked window.

Once locking is set up you may use any of the other window
commands to zoom, unzoom, change window sizes, etc.  Any new
windows you open will be unlocked.
$nextunlocked 01 01 04 65 Show Next Unlocked Window
019774 04 01 01
01 15 06 01 we lockedwindows
Once you have locked one or more windows, then the first time you
use ^X+^U the first unlocked window will be displayed in whatever
unlocked space is left over.  You can display the other unlocked
windows one at a time by using ^X+^U again.
$status 01 03 11 65 Status Line
020157 11 01 03
04 43 06 01 we hiddenwindows
05 44 06 01 we lockedwindows
11 43 12 01 we statusflags
The status line above each window shows a variety of things
about that window.  The name of the file shows at the left,
followed by "(new)" if the file is newly created by this editing
session.  "(H)" is shown if the window is hidden (and in zoom
mode), and "(L)" is shown if the window is locked.

The two numbers at the far right are the row and column where the
cursor is positioned in the file, and the number in parentheses
is the number of lines in the file.

To the left of the line count is a set of status flags.
$statusflags 01 07 13 64 Status Line Flags
020940 13 01 07
01 38 18 01 we status
07 07 11 01 we insmode
08 17 22 01 we paraformat
09 07 46 01 we autoblankline
10 14 21 01 we autoindent
11 13 21 01 we autoindent
12 07 23 01 we markcursormove
To the left of the line count in the window status line is a
blank area where several status flags can appear.  The following
status flags are defined.  If a flag does not appear then the
associated condition is not true.

  * - The file has been changed.
  I - Insert mode is active (otherwise typeover mode).
  P - Automatic paragraph reformatting is active.
  B - Automatically add blank line below after ENTER.
  > - Normal indenting after ENTER enabled.
  S - Smart indenting after ENTER enabled.
  M - Cursor movement marking enabled for cut and paste.

$insmode 01 01 13 64 Insert and Typeover Modes
021606 13 01 01
10 12 19 01 we statusflags
When you type text into WE it can be handled in two different
ways.  If WE is in "insert" mode a space will be opened at the
cursor to receive the text as you type it in, in other words
everything after the cursor will be shifted to the right to make
room.  If WE is not in insert mode it is in "typeover" mode,
where new text simply types over the old text and replaces it.
WE is normally in insert mode.

You can tell if WE is in insert mode by looking for the letter
"I" in the window status flags.

Insert versus typeover mode is selected separately for each
window.
$paraformat 01 03 15 65 Paragraph Formatting
022342 15 01 03
01 42 22 01 we paramargins
07 35 22 01 we editset_autopfmt
08 04 23 01 we settingmenu
WE lets you format paragraphs by setting left and right margins
and an indent for the first line.  You can also set the tab size
at the same time, and tell WE to add only one blank after a "."
instead of the normal two.

Reformat a paragraph at any time by pushing ^P.  If auto
formatting is turned on with the "Auto format paragraphs" command
on Edit Mode Settings menu then WE will format the paragraph for
you as you type it in.

WE recognizes several different types of paragraph separators.
It recognizes blank lines, indented lines, and lines that begin
with "$", ".", "#" or "*".  A "$" followed by a digit will not
be treated as a paragraph separator (because that is how dollars
are specified).
$autoblankline 01 05 14 65 Add Blank Line After ENTER Key
023269 14 01 05
02 10 04 01 we settingmenu
04 01 05 01 we toggleoptions
10 27 15 01 we smartindent
13 44 09 01 we enter
14 01 26 01 we kcdfile
The "Add line below after ENTER key" option on the Edit Mode
Settings menu will cause WE to insert a blank line below the
current line when you push the ENTER key.  Using this same option
again will turn this mode off.

This mode is very handy when you are typing in lots of new text
and want the ENTER key to automatically create space for the next
line.

This option combined with smart indenting makes it very easy to
type in "C" source code.

You may also configure the behavior of the ENTER key in the
WE.KCD key definition file.
$autoindent 01 03 13 65 Automatic Indenting
023967 13 01 03
04 50 07 01 we smartindent
09 21 12 01 we autoindentsafe
13 15 23 01 we settingmenu
When auto indenting mode is turned on the cursor automatically
moves in to indent the following line each time ENTER is pushed.
There are actually two auto indenting modes.  "Normal" auto
indenting just indents to match the line above.  "Smart" auto
indenting is much more sophisticated, performing some simple
syntax checking of "C" source code to figure out the correct
indent.

Auto indenting will never change the indenting of a line you have
already typed in.

The auto indent mode is selected with the "Set auto indent mode"
option on the Edit Mode Settings menu.
$autoindentsafe 01 00 10 64 Auto Indent Safety
024615 10 00 00
Auto indenting will not change the indent of any line containing
non-whitespace characters.  It will instead attempt to position
the cursor at what it considers to be the correct indent in the
existing line.  It will not move the cursor in past the leftmost
non-whitespace character on the line.

The actual algorithm used by ALL auto indenting is to first
position the cursor as described above, and add more blanks to
reach the correct indent only if it reaches the end of line and
hasn't encountered any non-whitespace characters.
$smartindent 01 06 13 63 Smart Auto Indenting
025402 13 01 06
01 07 14 01 we autoindent
01 32 22 01 we smartindentlogic
09 16 18 01 we configfiles
12 22 13 01 we insbracepair
12 42 16 01 we insclosingbrace
13 23 29 01 we autoblankline
Smart auto indenting uses some simple syntax analysis to
determine the proper indent for a line of "C" source code.
It recognizes two different indents - the indent to apply to
statements following control statements such as "if()" and
"for()", and the indent to apply to statements enclosed by {}
braces.  It will both indent and outdent as required.

Both indents default to 1 column.  These values may be modified
by editing the configuration file.

Smart indenting is designed to work hand in hand with the
commands to insert a brace pair {} and a trailing brace }, and
the ENTER key mode to automatically add blank lines.
$smartindentlogic 02 02 11 65 Smart Indenting Logic
026190 11 00 00
026805 07 01 02
02 11 17 02 we insbracepair
02 35 20 02 we insclosingbrace
Smart auto indenting does not perform a complete syntax analysis
of your source code, instead it attempts to recognize "C"
statements in the two lines above the line being indented.

In simplied form: If the line above contains a "C" control
statement or begins with a "{" or "}" then the appropriate indent
or outdent is applied.  Otherwise the second line above is
checked to see if it looks like the first line is a one line
indent caused by a simple statement following a control
statement, such as "if() (newline) return;".  If none of these
apply then the line is indented to match the line above.
This logic works much better if compound statements are built
with the "Insert brace pair" and "Insert closing brace" commands,
particularly if you indent statements inside a {} brace pair.
This is because the indent of a line containing a closing brace
is not determined by the lines above, it is determined by the
simple fact that it is a closing brace - and smart indenting has
to decide on an indent before you type anything on the line!
$toggleoptions 01 00 09 65 Dual Purpose Menu Options
027325 09 00 00
Menu options controlling modes that can be turned on and off work
a little differently from other menu options.  Each time you use
the option it will switch the mode to the other setting, so that
it has the opposite effect each time you use it.  The wording of
options like this is changed to reflect the current setting of
the mode it controls, so you can tell what the option will do
each time you use it.  For example, an option might say "Turn
mode X on" or "Turn mode X off" depending on whether mode X is
currently on or off.
$ctrl_x 01 01 14 64 Special Key Commands
027949 14 01 01
14 01 19 01 we kcdfile
There are many WE commands available both as menu options and
special key commands.  Special key commands are commands entered
without a menu.  They are either function keys, or keys combined
with "modifier" keys "Shift", "Ctrl" (referred to as "^"), or
"Alt".

Special key commands can be single input commands, like F2,
Shift/F2 or ^P, or double input commands, like ^X+^O or ^X+^P.

If a menu option has an equivalent special key command that
command will be listed in parentheses at the end of the option.

Key choices for special key commands are defined by the
key definition file.
$searchmenu 01 02 03 65 Search and Replace
028664 03 01 02
01 38 08 01 we searchcommands
03 46 09 01 we menu
The Search and Replace menu contains commands lets you search for
(and optionally replace) words or strings of letters in the file.
The Search and Replace menu is listed on the Main menu.
$searchcommands 01 03 15 65 Search and Replace Commands
029012 15 01 03
01 46 16 01 we searchwordstring
03 05 11 01 we searchmenu
03 44 20 01 we ctrl_x
These commands are used to search or replace words or strings in
the text of an editing window.  All these commands are listed on
the Search menu, and some of them are also special key commands.

You can search for an exact match to the capitalization you
enter, or ignore capitalization when searching.

The "replace" commands substitute new text for each word or
string found.  You will be asked to verify each change first.
You can answer "Yes" or "No", or "All" to replace all the rest of
the matches without asking.

Searching and replacing always starts at the cursor, so if you
want to search the entire file make sure you move to the top
first.
$searchwordstring 01 00 07 65 Words vs Strings
029745 07 00 00
Search or replacing "words" means looking for sequences of
characters bounded by blanks or punctuation marks.  Looking for
"strings" means any occurence of the text being searched for,
regardless of what it is bounded by.

For instance, doing a word search for "at" won't find "that".
Doing a "string" search for "at" would find "that", "state", etc.
$cutpastemenu 01 02 04 65 Cut and Paste Menu
030220 04 01 02
01 33 08 01 we cutpastecommands
04 54 09 01 we menu
The Cut and Paste menu contains commands to mark sections of text
and then do things such as delete, move, or make a copy them.
The parts of the file you have marked will appear highlighted on
the screen.  The Cut and Paste menu is listed on the Main menu.
$cutpastecommands 01 05 09 62 Cut and Paste Commands
030690 09 01 05
03 38 18 01 we cutpastemenu
04 01 23 01 we blockmenu
06 10 28 01 we markcommands
07 10 35 01 we cutpasteall
08 10 34 01 we blockedit
These commands do various things to mark sections of text and
perform operations on them.  These commands are divided into
three groups.  All are listed on the Cut and Paste menu or the
Block Manipulation menu.

         Commands to mark/unmark text
         Commands to work on ALL marked text
         Commands to work on a marked block

$cutpasteall 01 06 10 65 Commands to Work on ALL Marked Text
031290 10 01 06
02 22 26 01 we markunique
04 28 16 01 we markclearall
05 34 18 01 we cutpastemenu
07 12 18 01 we cutpaste_del
08 12 26 01 we cutpaste_mov
09 12 35 01 we cutpaste_cpy
These commands work on ALL the marked text in a window.  Remember
that because of WE's unique way of marking text you can have bits
of marked text scattered all over a file.  If you're not sure
what's marked it's best to clear everything and re-mark it.  All
these commands are listed on the Cut and Paste menu.

           Delete marked text
           Move marked text to cursor
           Copy marked text and leave original

$cutpaste_del 01 00 03 65 Delete Marked Text
031792 03 00 00
This command deletes all marked text from the current window.  If
all characters on a line are marked then the entire line is
deleted instead of leaving a blank line.
$cutpaste_mov 01 01 03 63 Move Marked Text to Cursor
032062 03 01 01
03 42 17 01 we cutpaste_eol
This command will move all marked text in the current window to
after the cursor.  The original text is deleted, only the copy
remains.  Line breaks in the marked text will be preserved.
$cutpaste_cpy 01 01 03 64 Copy Marked Text and Leave Original
032361 03 01 01
03 27 16 01 we cutpaste_eol
This command will insert at the cursor a copy of all marked text
in the current window.  The original text is unaffected.  Line
breaks in the marked text will be repeated in the new text.
$cutpaste_eol 01 02 17 65 Line Breaks in Marked Text
032681 17 01 02
01 01 04 01 we cutpaste_mov
01 10 04 01 we cutpaste_cpy
Move and Copy do different things with entire marked lines and
bits of marked text within a line.  Mostly it works intuitively:
When entire lines are marked, entire lines are inserted at the
cursor.  When bits of a line are marked, just the characters are
inserted, and no new lines created.

The only thing to be careful of is to position the cursor at the
beginning of a line before moving or copying entire marked lines.

The only time results can be confusing is when pieces of several
adjacent lines are marked.  Here is the actual method WE uses:
Any time move or copy reads a line of text that is entirely
marked, a line break is added at the destination after the line
is inserted.  A line break is also inserted when the last
character on a line is marked and anything on the next line is
marked.  All other marked text is inserted at the cursor with no
line breaks.
$markcommands 01 06 20 65 Marking and Unmarking Text
033810 20 01 06
03 19 42 01 we markunique
08 15 18 01 we markline
09 15 23 01 we markchar
10 15 27 01 we markcursormove
11 15 25 01 we markclearall
13 20 33 01 we markdisplay
Many operations in WE work on "marked" text.  Text can be marked
in many different ways, but it is all treated the same once it is
marked.  WE has a very different way of defining marked text than
most editors and word processors.

Here are the basic ways to mark and unmark text:

              One line at a time
              One character at a time
              Marking as the cursor moves
              Clear all marks in window

Marked text always appears differently on the screen so you will
know what is marked.

A line can be marked even if there is no text on it, i.e.  it is
a blank line.  A blank line is marked by using the "mark entire
line" command.  Unfortunately, there is no visual clue that such
a line has been marked.  You simply have to remember that you
marked it.
$markdisplay 01 00 05 65 Displaying Marked Text
034686 05 00 00
On color screens marked text appears as white letters instead of
the normal black, on a darker blue background instead of the
normal very light blue.  On monochrome screens the marked text is
displayed in reverse video, i.e.  black letters on a white
background instead of the other way around.
$markunique 01 00 11 65 WE Marked Text
035043 11 00 00
Most editors and word processors use "beginning" and "ending"
markers to "enclose" text that is marked.  There is usually only
one pair of markers, so you can only have ONE piece of marked
text at any time.

WE doesn't do this.  WE marks text character by character, with
no beginning and ending markers.  This allows any bits of text to
be marked, anywhere in the file.  It can be extremely convenient
to mark pieces of text all through a file and then write them all
out to a file, copy them somewhere else in the file, delete them,
whatever.
$markline 01 00 16 65 Marking/Unmarking One Line
035666 16 00 00
Push the F2 key to mark the entire line that the cursor is on.
The line will be marked and redisplayed.  If the current line is
already entirely marked then the cursor will first move down to
the next line.  This allows you to conveniently mark several
lines in a row by pushing F2 several times.

To unmark everything on a line move the cursor to that line and
push Shift/F2.  This will unmark and redisplay the line even if
only part of the line was marked.

If you push Shift/F2 on a line which has nothing marked, WE will
look first at the line above, and then the line below, to see if
either one has any text marked.  If it finds any it will move the
cursor to that line and unmarked it.  This allows you to push
Shift/F2 several times in a row to unmark several lines without
having to stop and move the cursor between each one.
$markchar 01 01 07 65 Marking/Unmarking One Character
036615 07 01 01
02 14 12 01 we markline
Marking and unmarking single characters is very similar to doing
the same for entire lines.  The F3 and Shift/F3 keys are used
instead of F2 and Shift/F2.

F3 marks the character at the cursor and moves right one
character.  Shift/F3 unmarks the current character, moving left
or right one column first if the current character is not marked.
$markcursormove 01 02 14 65 Marking as the Cursor Moves
037096 14 01 02
02 30 18 01 we cutpastemenu
08 31 17 01 we statusflags
The cursor can be used as a "marking pen" to mark text as it
moves.  Three options on the Cut and Paste menu control this:

         Mark letters as cursor moves
         Don't mark letters as cursor moves
         Switch cursor movement marking mode

The letter "M" appears in the status line flags when cursor
movement marking is enabled.  When it is enabled the arrow keys,
PgUp, and PgDn will mark text as they move the cursor.

Other actions resulting in cursor movement, such as searching or
typing text, will not cause text to be marked.  Only explicit use
of these keys will have that effect.
$markclearall 01 01 04 65 Clear All Marks
037800 04 01 01
01 48 18 01 we cutpastemenu
The "Clear all marks in window" command on the Cut and Paste menu
will clear all marks from text in the current window.  This is a
good safety precaution if you aren't sure whether you've left
bits of marked text scattered about the file.
$miscmenu 01 05 09 65 Miscellaneous Menu
038237 09 01 05
01 39 09 01 we menu
05 09 34 01 we searchfiles
06 09 22 01 we dosshell
07 09 20 01 we insbracepair
08 09 23 01 we insclosingbrace
The Miscellaneous menu (listed on the Main menu) contains options
that don't fit anywhere else.  This includes the following
options, as well as others:

        Search wildcard file list for text
        Temporary MS-DOS shell
        Insert brace pair...
        Insert closing brace...

$paramargins 01 02 03 62 Paragraph Margins
038652 03 01 02
01 41 20 01 we paraformat
03 01 23 01 we settingmenu
The margins and other settings used for paragraph formatting
are set by the "Margins and Formatting Options" command on the
Edit Mode Settings menu.
$configfiles 01 05 16 65 Configuration Files
039039 16 01 05
10 03 23 01 we configop_path
11 03 25 01 we configop_pagelength
12 03 23 01 we configop_controlindent
13 03 21 01 we configop_braceindent
15 44 08 01 we configoptions
WE reads a file named "WE.CFG" to find configuration information.
WE first looks in the current directory for this file, then in
looks in the MS-DOS search path.

The configuration file is an ASCII text file.  Each line begins
with a keyword that determines what type of line it is.  The
keyword can be either upper or lower case.  The following
keywords are defined:

  path <globalsearchpath>
  pagelength <linesperpage>
  controlindent <columns>
  braceindent <columns>

Some configuration file information can be modified inside WE for
the current editing session.
$configop_path 01 01 11 64 Global Search Path
039713 11 01 01
03 20 11 01 we filepath
path <globalsearchpath>

Defines the global search path used when opening files to create
new windows.  <globalsearchpath> is a list of directory names
separated by semicolons.  No global search path is used if none
is defined here.

Example:

  path c:\borlandc\include;c:\myhdrs

$configop_pagelength 01 00 12 65 Printer Page Length
040077 12 00 00
pagelength <linesperpage>

Defines the number of lines of text that will fit on a printer
page.  The default value for this is 66, which is correct for
most printers.  The common exception is laser printers and inkjet
printers, which can't print at the very top and very bottom of
the page. The usual setting for these is 60.

Example:

  pagelength 60

$configop_controlindent 01 01 10 65 Control Statement Smart Indent
040556 10 01 01
05 01 15 01 we smartindent
controlindent <columns>

Defines the number of columns to indent the statement below a "C"
control statement, such as "if()", "for()" or "switch()", during
smart indenting.  The default value is 1.

Example:

  controlindent 3

$configop_braceindent 01 01 10 65 {} Compound Statement Smart Indent
040909 10 01 01
04 37 15 01 we smartindent
braceindent <columns>

Defines the number of columns to indent inside a pair of "C"
compound statement braces {} during smart indenting.  The default
value is 1.

Example:

  braceindent 0

$kcdfile 01 02 18 65 Key Definition File
041217 18 01 02
04 21 29 01 we kcdline
14 05 09 01 we kcdenter
All the actions produced by keystrokes in WE are controlled by an
ASCII text file called the "Key definition file".  This allows
you to completely reconfigure the keyboard to suit your tastes.
Each line of WE.KCD defines the action of one key or key
combination.

The key definition file is WE.KCD.  It must be present in either
the current directory or the MS-DOS search path.  The current
directory is searched first.

For convenience and safety, a backup copy of the standard WE.KCD
is supplied as WENOR.KCD.

The ENTER key is a somewhat special case.

The menus always show the correct keystroke commands after the
menu options, but the help messages do not adapt this way.  The
F1 key is permanently assigned to displaying help.
$kcdline 01 02 18 68 Key Definition Line
042079 18 01 02
01 18 19 01 we kcdfile
01 51 15 01 we kcdkeyname
Each line in the key definition file contains the name of the key
(or double key) being defined, followed by a pre-defined 3 letter
code specifying the action to take when those key(s) are pressed.
One or more blanks are required between items on the line.
Comments can be added to the end of a line by prefixing them with
a "!" character.  Lines that are blank or contain only a comment
are ignored.  For example:

   Back           dpv  ! Delete previous character
   Home           lfx  ! Move cursor to beginning of line
   ^E             dte  ! Delete from cursor to end of line
   Shift/F6       spw  ! Switch to previous window
   ^X   ^O        opn  ! Open file and load into new window
   ^X   ^F        ser  ! Search for string with exact capitalization

All the 3 letter codes are described in file WECMD.KCD, which is
a normal key definition file with full comments and all the
keystrokes omitted.
$kcdkeyname 01 00 16 65 Key Names
043059 16 00 00
Most key names are self-evident.  All the standard ones are used
in WENOR.KCD, so look in that file for reference.

Combination keys (shift, alt and ctrl) are formed by prefixing
the normal key with "Shift/", "Ctrl/", "^" (same as /Ctrl), or
"Alt/".  No spaces are allowed between the parts.

It does not matter what capitalization you use.

Some combination keystrokes seem sensible, but the keyboard is
actually incapable of producing them through the BIOS.  An
example of this is "Ctrl/Tab".  WE will give you an error message
at program startup if it finds such a key in WE.KCD.  Briefly,
you can use function keys by themselves, shifted, ctrl'ed, or
alt'ed, alt keys A-Z and 0-9, and a variety of named keys,
sometimes ctrl'ed.
$kcdenter 01 02 11 65 Choosing an Action for the ENTER key
043931 11 01 02
08 17 09 01 we enter
08 34 19 01 we kcdfile
Unlike other keys with an obvious intent, like the arrow keys,
the ENTER key can plausibly do several different, though similar,
things.  Does it merely move the cursor?  Does it create a new
line?  When and how?

These choices are purely a matter of personal taste.  To
accomodate this WE supplies several different actions that can be
assigned to the ENTER key in the key definition file.  The
standard setting is "ent", which just moves to the next line, but
there are several other choices which will add a blank line below
instead under different conditions.
$cmdlinopts 02 06 15 65 Command Line Options
044748 15 01 06
045423 09 00 00
02 14 10 01 we openspec
03 28 16 01 we filepath
04 01 18 01 we configfiles
06 43 14 01 we pickfile
11 01 13 01 we sessionfiles
15 34 06 01 we hiddenwindows
The MS-DOS command to execute WE is just "WE" optionally followed
by a list of file names separated by spaces.  A window will be
opened for each file.  The file search path listed in the
configuration file is searched to find each file.

If a file name contains a wildcard then a directory list with
matching files will be displayed to pick from.  If no files names
are used in the command line then a directory window with the
contents of the current directory is opened.

Session files may be used with the "@" character prefix to open
groups of files.

If a postfix of "/H" or "/h" is to a file name then the window
with that file will initially be hidden.
Example command lines:

    we
    we @
    we @mylist.ses
    we main.c hdr.h @other.ses
    we @ hdr.h
    we lib1.c main.c hdr.h

$filepath 01 03 18 65 File Search Path
045705 18 01 03
13 01 18 01 we configfiles
16 02 25 01 we configoptions
16 43 18 01 we miscmenu
Any time you open a window in WE to look at a file, WE will check
to see if a disk or path is specified in the name.  If so then WE
looks for the file exactly as named, otherwise it looks for it in
a list of directories called the "File Search Path".  The file
search path is much like the "PATH=" program search path used by
MS-DOS to process command names entered at the command prompt.

There are actually two file search paths checked when a file is
opened.  The "local path" is specific to the current window, and
is generally the directory containing the file in that window.
If the file cannot be found in the local path then the global
search path is checked.  This path is defined in the WE.CFG
configuration file read by WE.

Both of these search paths can be modified while in WE with the
"Set Configuration Options" option on the Miscellaneous menu.
Any changes to the global search path will only stay in effect
for this session in WE.
$sessionfiles 01 03 19 65 Session Files
046809 19 01 03
03 11 16 01 we filepath
10 01 16 01 we cmdlinopts
12 24 27 01 we fileclsall
Session files are ASCII text files containing a file name on each
line.  WE will read these files and open a window for each file.
The usual file search path will be used to try and locate each of
the files listed in the session file, but not the session file
itself.

There are three times where WE will use a session file:

1.  If the single character name "@" is listed as a file on the
DOS command line which invokes WE, then if session file WE.SES
exists in the current directory WE will use it.  This session
file is created by the "Close all window and exit" command.

2.  Any time you attempt to open a file and prefix the name with
the "@" character.  This can be done at the DOS command line, or
when opening a new window while in WE.

3.  After files listed on the DOS command line or in WE.SES are
opened, WE will use session file WEG.SES if it exists.
$searchfiles 01 01 17 65 Search Wildcard File List for Text
047796 17 01 01
01 20 18 01 we miscmenu
This option on the Miscellaneous menu will scan through all files
matching a wildcard you specify.  The search will look for
letters, words or phrases that you specify.

There are a number of options you can use for the search.  You
can search all subdirectories of the wildcard you specified, you
can search for whole words only as opposed to sequences of
letters imbedded in words, and you can search in a case sensitive
or case insensitive fashion.

You can also do a "topic keyword" search or a "full file"
search.  A full file search is just what it sounds like - every
line of each file is checked.  A topic search will only check
lines which contain the string "$TOPIC".  The "$TOPIC" must be
in upper case, unless the search is case insensitive.  "$TOPIC"
will usually be at the beginning of the line, followed by topic
keywords which characterize the file it is contained in.
$configoptions 01 03 08 65 Configuration Options
048843 08 01 03
01 47 18 01 we miscmenu
03 10 18 01 we configfiles
04 39 11 01 we filepath
The "Set configuration options" option on the Miscellaneous menu
will allow you to look at and change some of the information read
from the configuration file, as well as configuration information
for the current window (currently the search path for that
window).

"Set configuration options" will not save any changes you make.
Changes will only last until you leave WE.
$setcnfpthg 01 00 03 64 Global Search Path
049285 03 00 00
Enter one or more directory names, separated by semicolons.  The
local search path for the current window will be searched before
the global search path entered here.
$setcnfpthl 01 00 04 63 Local Search Path
049515 04 00 00
Enter one or more directory names for the local search path for
this window, separated by semicolons.  This search path will be
used before the global search path, when opening windows from
this window.
$dosshell 01 01 10 64 Temporary MS-DOS Shell
049810 10 01 01
01 44 18 01 we miscmenu
The "Temporary MS-DOS shell" option on the Miscellaneous menu
will temporarily drop the user out of WE back to the MS-DOS
command prompt.  Your current work in WE will be preserved until
you type "exit" at the MS-DOS prompt and return to WE.

You will have a limited amount of memory to use while at the
MS-DOS prompt, the exact amount depending on the size of the
files that are loaded into WE.  You probably will not be able to
execute major applications from the MS-DOS prompt, but you
should be able to perform simple file manipulations.
$settingmenu 01 02 02 63 Edit Mode Settings Menu
050479 02 01 02
01 46 18 01 we editsettings
02 39 09 01 we menu
The Edit Mode Settings menu contains all the edit mode settings
commands.  This menu is listed on the Main menu.
$editsettings 01 06 12 65 Edit Mode Settings Commands
050841 12 01 06
02 38 23 01 we settingmenu
03 05 42 01 we toggleoptions
06 11 30 01 we paraformat
07 11 30 01 we editset_autopfmt
08 11 38 01 we autoblankline
09 15 16 01 we autoindent
These commands either change edit mode settings or display status
information.  They are listed on the Edit Mode Settings menu.
The wording and action of some options changes depending on the
setting of the mode they control.

          Margins and formatting options
          (Don't) auto format paragraphs
          (Don't) add line below after ENTER key
          Set auto indent mode
          Other configuration information
          Display status information

$editset_autopfmt 01 03 04 65 (Don't) Auto Format Paragraphs
051486 04 01 03
01 28 23 01 we settingmenu
02 31 25 01 we paraformat
03 16 29 01 we toggleoptions
This option, listed on the Edit Mode Settings menu, controls
whether text is automatically formatted into paragraphs as it is
typed in.  The wording of the option changes depending on whether
this mode is enabled or not.
$blockmenu 01 02 02 58 Block Manipulation Menu
051823 02 01 02
01 46 13 01 we blockedit
02 39 09 01 we menu
The Block Manipulation menu contains all the block editing
commands.  This menu is listed on the Main menu.
$blockedit 01 11 19 65 Block Editing Commands
052303 19 01 11
02 04 14 01 we block_adjlines
02 22 11 01 we markcommands
07 01 20 01 we paraformat
10 42 23 01 we blockmenu
11 33 20 01 we ctrl_x
13 09 29 01 we block_inscol
14 09 23 01 we block_delcol
15 09 45 01 we block_write
16 09 26 01 we block_append
17 09 40 01 we block_white
18 09 32 01 we block_last
These commands operate on the current "block", which is the set
of adjacent lines of marked text the cursor is in.  These
commands restrict themselves to the block the cursor is in if
there are several marked blocks.

Several of these commands produce strange results if automatic
paragraph formatting is enabled when they are used, and line
lengths are extended past the allowed right margin.

The following commands are listed on the Block Manipulation menu.
Many of these commands are also special key commands.

        Insert blank column at cursor
        Delete column at cursor
        Write string or number in each line at cursor
        Append string to each line
        Strip trailing whitespace from each line
        Trim last character on each line

$block_adjlines 01 00 07 65 Adjacent Lines in a Block
053160 07 00 00
If any part of a line is marked it is counted as part of a block,
along with any adjacent lines that are also marked.  It does not
matter how much of each line is marked, if any part is marked the
line is included.  If the cursor is not on a marked line block
commands will only operate on the current line.  There can be
several different marked blocks in a file at the same time,
because one or more completely unmarked lines separate them.
$block_inscol 01 01 03 63 Insert Blank Column at Cursor
053710 03 01 01
01 06 21 01 we blockedit
This block editing command will insert a blank column at the
cursor position in a block of adjacent marked lines.  If a line
does not extend to the cursor column it is not changed.
$block_delcol 01 01 03 65 Delete Column at Cursor
053988 03 01 01
01 06 21 01 we blockedit
This block editing command will delete a column at the cursor
position in a block of adjacent marked lines.  If a line does not
extend to the cursor column it is not changed.
$block_write 01 02 12 65 Write String or Number in Each Line at Cursor
054305 12 01 02
01 06 21 01 we blockedit
06 41 23 01 we insmode
This block editing command will write a string or incrementing
number at the same column in each line of a block of adjacent
marked lines.  The column position of the cursor is used as the
column position to write in.

The string or number will be written in insert or typeover mode
depending on the mode currently set for the window.  If a number
is written then you may specify the beginning number and how much
to increment it between lines.

If a line in the block is not long enough to reach the column to
write to then that line is not changed.
$block_append 01 01 02 61 Append String to Each Line
054965 02 01 01
01 06 21 01 we blockedit
This block editing command will append a string to the end of
each line in a block of adjacent marked lines.
$block_white 01 01 02 63 Strip Trailing Whitespace from each Line
055186 02 01 01
01 06 21 01 we blockedit
This block editing command will delete trailing whitespace from
each line in a block of adjacent marked lines.
$block_last 01 01 02 65 Trim Last Character on Each Line
055400 02 01 01
01 06 21 01 we blockedit
This block editing command will delete the last character on each
line in a block of adjacent marked lines.
$autoindentmenu 01 01 01 61 Auto Indent Menu
055600 01 01 01
01 41 11 01 we autoindent
This menu contains options to pick the "auto indent" setting.
