PFE Help
Programmer's File Editor Help File

The PFE help file contains full information on the current version of the editor. There is no written documentation, but you will be able to find all that you need both to begin work with PFE, and to use its more advanced features, in here.

When you're using PFE's dialog boxes, you can get help on the exact steps you should take by clicking the Help button or pressing the F1 key.

Like all Windows help files, this one contains many hypertext links which take you from one topic to another in a structured way. Also, most topics set up the Up button above the text display area to take you to the most appropriate menu topic, so you can easily retrace your steps from a lengthy session of following links.

If you're not sure how to use the Windows Help System, select the How To Use Help item from the Help menu at the top of this window, or from PFE's own help menu.

Introduction To PFE	This section gives you general information on PFE, tells you where you can get the latest version, and contains notes specific to this release

Procedures	This section tells you how to go about doing things in PFE, and explains PFE's features

Commands	This section gives you information on each of PFE's menu commands. You can look here for a summary of what a menu command does, then follow the links into the Procedures section for a fuller explanation

Reference	This section contains reference information: there are lists of the default key bindings, of the various bindable functions, the format of the initialisation file pfe.ini and so on

Programmer's File Editor is Copyright © Alan Phillips 1992, 1993


Introduction To PFE

Welcome to Programmer's File Editor, a programmer-oriented text editor for Windows 3.1, Windows for Workgroups 3.1 and Windows/NT.

PFE is a standard Windows Multiple Document Interface (MDI) application, which means that you can operate it in the same way as any other standard Windows application. It features many powerful facilities, which you will find described in the sections in this help file.

This introductory section gives you an overview of what PFE is, tells you where you can the latest version, and so on

What is Programmer's File Editor?

Disclaimer

Where To Get It

Distributing PFE

Notes On This Release

Acknowledgements


What Is Programmer's File Editor?

Programmer's File Editor (PFE) is a large-capacity text file editor for Windows 3.1, Windows For Workgroups 3.1, and  Windows/NT. It is oriented towards those who use Windows as their program development environment, and so incorporates many features that make it a convenient work management system.

PFE's capacity is essentially limited only by the total amount of memory available on your system. There are no editor-imposed limits on the number of files that you can edit simultaneously, nor on the number of edit windows that you may have open. There is no limit on the size of file that can be handled, and none on the number of lines that a file may contain.

PFE adheres strictly to the Windows MDI conventions. You can invoke most commands and facilities from menus; you can move around with a mouse or with the standard keyboard shortcuts; you can cut and paste from the clipboard, and so on.

You can reconfigure the use of keys, so that if you don't like the built-in way PFE works, you can change which keys do what to suit your preferences. If you like, you can set it to work in a similar way to the MicroEMACS editor, and have commands invoked by two-character key sequences like ESC G.

PFE is able to run DOS commands, such as compilers, and to capture their output into windows for inspection. This lets you use it as an integrated development environment, cutting down the amount of work you need to do to build and test your applications. You can also quickly launch the application you're developing, and you can configure details of the Windows tools that you use, so that these too can be launched with only a few mouse clicks.

There are also some features that let you build files more easily. You can define sets of templates - standard lines of text - that you can insert into the file you're editing with just a few mouse clicks. You can group the templates you work with into distinct files, and load them for use automatically.

Why should you use PFE? If you already have a favourite editor, fine. PFE is not sold for money, so the author has no need to persuade you to do something you don't want. However, you might like it; and you are also very welcome to contribute ideas for improvements. Especially in the beta releases (which have version numbers like 0.xx.xxx) there is a great deal of scope for changing and improving things, so let the author know what you think.


Disclaimer

Programmer's File Editor is supplied on an as-is basis. The author offers no warranty of its fitness for any purpose whatsoever, and accepts no liability whatsoever for any loss or damage incurred by its use.

PFE is not a supported product. The author accepts no commitment or liability to address any problems that may be encountered in using it; however, PFE is continually being developed and improved, so he is always interested to hear about any bugs or deficiencies.


Where To Get It

Programmer's File Editor is available from a wide range of archive sites throughout the world. New releases are uploaded by the author to three major archives:

-	For those at Higher Education establishments on the JANET network, copies are placed on the uk.ac.hensa.micros archive, in directory micros/ibmpc/win/b/b085

-	For those with Internet access, copies are posted to:

ftp.cica.indiana.edu (initially in directory /pub/pc/win3/uploads, ultimately in /pub/pc/win3/programr)

wsmr-simtel20.army.mil (directory pd:<msdos.windows3>)

The versions on these archives will be the definitive latest releases. Note that files can take a long time to be placed in their final directories on CICA, so check in the uploads area (and any subdirectories this contains) first.

The author also passes releases to the moderator of the comp.binaries.ms-windows group on Usenet, and posts announcements to the comp.os.ms-windows.announce group.

Though not posted there by the author directly, copies will normally be available on CompuServe within a few days of release, in the General Apps/Info library of the WINADV forum.

From here it will gradually spread to other repositories: if you know of an archive in your part of the world that doesn't yet have the latest release, please upload a copy there too.


Distributing PFE

Programmer's File Editor may be freely used by any private individual or non-commercial organisation for any purpose. You may distribute it to anyone, and you may place it on any archive or bulletin board system for wider access. You may not charge anyone for it other than a reasonable fee to cover your distribution costs.

Normally, you should distribute PFE in the form as supplied by the author; however, you may repackage it to suit the conventions and needs of an archive or bulletin board system if you wish.


Notes On This Beta Release

This is a beta release of Programmer's File Editor. Although is reliable in operation - many people all over the world now use it as their preferred editor, and the author does all the development work on PFE with it - not all the planned facilities have yet been added to it, and some facilities may be provided in a different way in the ultimate release.

The changes.txt file that accompanies each release gives you a history of the new facilities that have been added and the bugs that have been fixed, and a list of the bugs that have been reported but not yet cleared.

The author welcomes feedback from users, and ideas for further facilities.

Notes Specific To The Windows/NT Version


Notes Specific To The Windows/NT Version

The Windows/NT version of PFE for i386 platforms, distributed as pfe32.exe, has been built on the March 1993 Beta Release. It will work on this and on the final release of Windows/NT, but it will not run on the October 1992 Beta Release/

The changes.txt file that accompanies each release lists any bugs and problems specific to the Windows/NT version; items are marked [PFE32]. You should also consult the file winnt\readme.txt for the most up-to-date information for this version.

Both the Windows/16 and Windows/NT versions use the same format of initialisation file and key mapping files. However, if you have both systems installed on your machine, they will be maintained separately, as the systems will use different Windows directories. The Windows/NT version has not been tested with the initialisation file mapped to the registry.

The format of template files is also common to both versions.

The Windows/16 and Windows/NT versions run independently of each other. An attempt to start the Windows/NT version will never instead pass control to a Windows/16 version running under the Win16 subsystem, and vice versa.

All current testing work on the Windows/NT version by the author uses a FAT-based file system. Other users have reported that the editor works correctly on NTFS partitions; however, care is advised.


Acknowledgements

I'm happy to be able gratefully to acknowledge here the help of those who have contributed ideas and testing time towards this project. Bug reports,  comments and suggestions are always welcome from everyone.

The DDETester Visual Basic application was written by Andy Errington.

Icons and bitmaps were designed by Dave Bleasdale.

Those who have worked with the beta releases, and found the time to pass on their findings, ideas and suggestions include (and if I've mislaid your name in my pile of printouts and haven't given you the credit you should have, do let me know!):

Peter Arien, Mark Atkinson, Dave Bleasdale, Vincent Broman, Jeremy Brown, Paul Butcher, Adrian Crisan, Richard Crossley, Sal Denaro, Kent Dietz, Charles Drake, Danek Duvall, Doug Harber, David Elliott, Dave Ellis, Andy Errington, Ken Ewart, Roger Foss, Andreas Furrer, Armand Gaudette, Marc Goldman, Jean-Luc Guimpier, Mark Hadfield, Roger Hadgraft, Bruce Hamilton, Andreas Hestermeyer, Paul Holmes-Higgin, Don Howes, Frank van der Hulst, Dave Ingles, Andy Jacobs, Omer van der Horst Jansen, Martin Kalugin, Cheong Koo, Santanu Lahiri, Michael John Marshall, Jim Martin, Brian McCashin, Rolf Michels, David M. Miller, Pentti Moilanen, Ron Murray, David Nugent, Tapio Peltola, Dave Postill, Gareth Rees, Jeff Rife, Steve Ronsen, Robert Schoolfield, Dan Shearer, Jeffrey Siegal, Nathan Silva, Gavin Silver, David Sowa, Richard Soence, Bob Stanojevich, Mike Strock, Julian Templeman, Russell Thamm, Alan Walford, Jack J. Woehr

Without their encouragement, bug detection and splendid notions PFE would be much inferior to what it now is. Thanks, guys.


PFE Menu Commands

The menu bar shown at the top of the main window contains a selection of items that you can use to perform many of PFE's operations. Not all of the menu items on the menu bar, and not all of those on each of the pull down menus, will appear if you don't have a file open - for example, there'll be no Edit item on the menu bar if there's no file to edit.

The File Menu	File-related commands that let you open, close and save files, etc.

The Edit Menu	Text-altering commands that let you search for strings and replace them, use the clipboard, etc.

The Options Menu	Commands for setting the screen font, manipulating file and window modes, controlling the status bar and tool bar, etc.

The Template Menu	Commands for handling all aspects of templates

The Execute Menu	Commands for running DOS commands and Windows tools, and for using keyboard macros

The Window Menu	Commands for arranging, duplicating and selecting windows

The Help Menu	Commands that start the Windows help engine


The File Menu

This item on the menu bar contains file-related options. Not all of the items listed here will appear on the menu if you don't have any files open.

File New

File Open

File View

File Insert

File Save

File Save As

File Save All

File Write

File Name

File Mail

File Close

File Close All

File Print

File Print Setup

File Exit

Most-Recently-Used List


File New Command
File New

This menu item creates a new, empty edit window in which you can type text.

Default command key:	Ctrl+N

Tool bar action:

Desktop mouse action:	Ctrl + Click Right Button

 The window will have no file name associated with it. The tab size and other settings will be the values you set up for "new files" with the Options Default File/Window Modes command

About Creating a New File


File Open Command
File Open

Opens one or more existing files for editing.

Default command key:	Ctrl+O

Tool bar action:

Desktop mouse action:	Click Right Button

Selecting this item shows you a standard dialog box, from which you can specify the file or files you want to work on.

About Opening Existing Files


File View Command
File View

Opens one or more existing files in read only mode. You will be able to examine their contents, but not alter them.

Default command key:	None

Tool bar action:	Shift +

Desktop mouse action:	Shift + Click Right Button

Selecting this item starts a dialog that is similar to the one produced by the File Open command. However, this dialog does not have a Read Only check box.

You can remove read only mode from a file with the status bar or with the Options Current File/Window Modes command.

About Opening Existing Files


File Insert Command
File Insert

Inserts an existing file anywhere into the text you're editing.

Default command key:	None

Selecting this item shows you a standard dialog box, from which you can specify the file to insert.

About Inserting An Existing File


File Save Command
File Save

Saves the contents of a file you're editing to a disk file.

Default command key:	Ctrl+S

Tool bar action:

If you haven't associated a name with the file yet, PFE treats this menu item as if you'd selected the File Save As command instead.

You cannot use this option to save a template that you're editing into a template file. Instead, use the Template Store or Template Store As commands.

About Saving A File To Disk


File Save As Command
File Save As

Saves the contents of a file to disk, allowing you to specify the file name.

Default command key:	None

Tool bar action:

Selecting this item shows you a standard dialog box, from which you can specify the name of the disk file you want to save the data to.

Using this option changes the name associated with the window, so that future File Save commands will write to the same disk file automatically.

About Saving A File To Disk


File Save All Command
File Save All

Saves all altered files, stores all altered templates into template files, and saves all altered template files in a single operation.

Default command key:	None

PFE will check through all the files and templates that you currently have open, saving them if they have altered.

The process is done in several stages. First, all altered named files are written to disk; then all altered templates that are already associated with template files are stored in the in-memory copy of the relevant template files.

Next, PFE will ask you if you want to save each altered file that does not have a name. You can elect not to save a file if you wish; if you do want to save it, you'll see a dialog asking you to give a file name.

After this, PFE will ask you if you want to store each unnamed template. If you elect to store one, you'll be asked to supply a name for the template, and to specify the template file it is to be stored in. If you don't have any template files attached, you'll see a warning message, and this step will be skipped.

Finally, PFE will save all the attached template files that have been altered to disk.

Clicking Cancel in any of the dialogs that occur in this process will cancel the entire operation.

About Saving A File To Disk


File Write Command
File Write

Writes the contents of a file to disk,  allowing you to specify the file name

Default command key:	None

Selecting this item shows you a standard dialog box, from which you can specify the name of the disk file you want to write the data to.

Unlike the File Save As command, this command does not permanently associate the name of the disk file with the window showing the data.

About Saving A File To Disk


File Name Command
File Name

Changes the disk file name associated with a window.

Default command key:	None

Selecting this item shows you a standard dialog box, from which you can specify the name of the disk file you want to associate with the window.

After using this command, the File Save command will write the data to disk in a file with the name you've specified.

This command does not affect any existing disk file.

About Saving A File To Disk


File Mail Command
File Mail

Mails the data in the current window to someone else, using a MAPI-compliant mailer.

Default command key:	None

The command saves the data in the current window to a temporary file, then calls the mail system to prompt you for delivery instructions.

Since the mailer may itself need to make a further copy of the file, you should ensure that you have adequate disk space available for this operation.

You will not be able to select this option if PFE does not detect a MAPI-compliant mailer in your system configuration when you start it.

About Mailing A File


File Close Command
File Close

Closes the file being shown in the current window. The current window, and all other windows showing the same file, will be closed.

Default command key:	None

If you have changed the file concerned, and haven't saved the changes to disk, PFE will prompt you and allow you to save the changes, to discard them, or to cancel the close.

About Closing A File


File Close All Command
File Close All

Closes all the files that you're working on. All windows will be deleted.

Default command key:	None

If you have changed any of the files concerned, and haven't saved the changes to disk, PFE will prompt you and allow you to save the changes, to discard them, or to cancel the entire close operation.

About Closing A File


File Print Command
File Print

Prints all or part of the current file.

Default command key:	Ctrl+P

Tool bar action:

The command starts a dialog that allows you to specify the details of how the file is to be printed and on which printer.

By default, PFE uses the same printer that you specified the last time you printed a file; default details of the printing, such as line folding and page headers, are taken from the window modes set on the current window.

You can also change the printer setup and the font to be used.

About Printing A File


File Print Setup Command
File Print Setup

Selects the printer to be used by default for printing files, alters its setup details, and selects the font to be used.

Default command key:	None

Tool bar action:	Shift +

The command starts a dialog that allows you to configure the various details. The settings are recorded, and will be used the next time you start PFE.

About Printing A File


File Exit Command
File Exit

Terminates your PFE session

Default command key:	None

This command will end your PFE session. If any of the files you're working with have changed, and you haven't saved the changes to disk, PFE will prompt you for each one in turn. You can choose to save the changes, discard them, or cancel the closedown.

The Exit Windows item in PFE's system menu allows you to end your PFE session and terminate Windows itself in a variety of ways.

About Ending a PFE Session


File Most-Recently-Used List Commands
File Most-Recently-Used List

This is not a single menu item, but a list that PFE adds automatically to the end of the File menu.

Whenever you open a file, PFE records the name in the list, ordering it so that the files you have used most recently always appear at the top. You can then re-open any file in the list simply by clicking on the menu item.

Unless you started PFE in multi-instance mode with a command line option or a setting in the initialisation file, PFE records the list in its initialisation file whenever you exit it. It will always re-instate the list when you start the next session.

You can control the size and display details of the list by editing the [options] section of the initialisation file:

-	The mru-list-size value sets the maximum number of file names that PFE records in the list: you can set this at any value between 0 and 64. PFE will take longer to initialise itself, and to write information to the initialisation file on termination,  the higher the value used.

-	The mru-files-shown value controls how many names are shown on the file menu itself: you can set this to any value between 0 and 8. On standard VGA screens, values above 5 may make the File menu too long to be conveniently shown on the screen.

When the list contains more files than can be displayed on the File menu, an extra menu command More Files is automatically added (if you've set the mru-files-shown value to be zero, the menu command will be Recent Files). The command starts a dialog that shows you the entire contents of the list, and lets you pick the file you want to open.


The Edit Menu

This item on the menu bar contains options concerned with altering text. It will not be shown if you have no files open.

Edit Cut

Edit Copy

Edit Paste

Edit Select All

Edit Select Word

Edit Delete Line

Edit Delete To End Of Line

Edit Goto Line

Edit Find

Edit Replace

Edit Repeat Last Find

Edit Repeat Last Replace

Edit Text


Edit Cut Command
Edit Cut

Deletes the highlighted text in the current window, placing it on the clipboard.

Default command key:	Ctrl+X

Tool bar action:

After this operation, you will be able to paste the deleted text into another PFE window, or into another application.

About Cutting, Copying and Pasting Text


Edit Copy Command
Edit Copy

Copies the highlighted text in the current window onto the clipboard.

Default command key:	Ctrl+C

Tool bar action:

After this operation, you will be able to paste the deleted text into another PFE window, or into another application.

Normally the text you've copied remains highlighted after this operation. You can arrange for the highlight to be removed by including the line

deselect-on-copy=1

in the [options] section of the initialisation file pfe.ini, which is held in your Windows directory.

About Cutting, Copying and Pasting Text


Edit Paste Command
Edit Paste

Pastes the contents of the clipboard into the current window at the position of the caret

Default command key:	Ctrl+V

Tool bar action:

You will only be able to perform this operation if the clipboard contains data in text format. PFE does not support pasting of bitmaps or other clipboard formats.

About Cutting, Copying and Pasting Text


Edit Select All Command
Edit Select All

Highlights the entire contents of the current window.

Default command key:	None

You can perform this operation wherever the caret currently is in the file. After it the caret will be positioned at the end of the file.

About Selecting Text


Edit Select Word Command
Edit Select Word

Highlights the word that the caret is currently in.

Default command key:	None

About Selecting Text


Edit Delete Line Command
Edit Delete Line

Deletes the entire line containing the caret.

Default command key:	Shift+Ctrl+K

This command deletes the entire line, wherever the caret is within it. The caret moves to the start of the following line.

About Deleting Text


Edit Delete To End Of Line Command
Edit Delete to End of Line

Deletes the text from the position of the caret to the end of the line containing it

Default command key:	Ctrl+K

If the caret is at the start of a line that is completely empty, the line following is moved up to close the gap.

About Deleting Text


Edit Goto Line Command
Edit Goto Line

Moves the caret to the start of a specific line.

Default command key:	F5

Used from status bar?:	Yes

The command starts a dialog that allows you to specify the line number of the target line. You can also choose to highlight all the text between the current position of the caret and the target line.

You can move to either an absolute line number, or move up or down by a number of lines from the current position.

About Moving to Specific Lines


Edit Find Command
Edit Find

Searches the current window for a text string.

Default command key:	F2

Tool bar action:

The command starts a standard dialog that lets you specify the details of the search. The dialog remains visible, and can be re-used for another search in the same window, or in another window.

About Finding Text


Edit Repeat Last Find Command
Edit Repeat Last Find

Repeats the last search operation, without prompting for details.

Default command key:	Shift+F2

Tool bar action:	Shift +

The command repeats the last search operation, using the details last set with the Edit Find command.

If you have not previously performed a search operation, the command acts as the Edit Find command and shows the standard dialog.

If the Edit Find dialog is visible, the command activates it rather than performing a search.

About Finding Text


Edit Replace Command
Edit Replace

Searches the current window for a text string, and optionally replaces occurrences with another string.

Default command key:	F3

Tool bar action:

The command starts a standard dialog that lets you specify the details of the operation. The dialog remains visible, and can be re-used for another search in the same window, or in another window.

Using the dialog, you can either scan through the file, deciding whether or not to replace each occurrence of a match; or you can elect to replace all occurrences automatically.

About Replacing Text


Edit Repeat Last Replace Command
Edit Repeat Last Replace

Repeats the last replace operation, without prompting for details.

Default command key:	Shift+F3

Tool bar action:	Shift +

The command repeats the last replace operation, using the details last set with the Edit Replace command.

If you have not previously performed a replace operation, the command acts as the Edit Replace command and shows the standard dialog.

If the Edit Replace dialog is visible, the command activates it rather than performing a replacement.

About Replacing Text


Edit Text Command
Edit Text

Shows a popup sub-menu containing text-related commands.

Edit Text Transpose Characters

Edit Text Uppercase Selection

Edit Text Lowercase Selection

Edit Text Indent

Edit Text Undent


Edit Text Transpose Characters Command
Edit Text Transpose Characters

Transposes the character to the right of the caret and the character to the left of the caret.

Default command key:	None

It has no effect if the caret is positioned at the start or the end of a line.

About Text Processing


Edit Text Uppercase Selection Command
Edit Text Uppercase Selection

Changes all lower-case characters in the currently highlighted text to upper-case characters.

Default command key:	None

About Text Processing


Edit Text Lowercase Selection Command
Edit Text Lowercase Selection

Changes all upper-case characters in the currently highlighted text to lower-case characters

Default command key:	None

About Text Processing


Edit Text Indent Command
Edit Text Indent

Moves the text in one or more lines right by one tab stop.

Default command key:	None

If you do not have any text highlighted, PFE indents only the line that the caret is in. Otherwise, it indents all the lines containing highlighted text.

About Text Processing


Edit Text Undent Command
Edit Text Undent

Moves the text in lines left by one tab stop.

Default command key:	None

If you do not have any text highlighted, PFE undents only the line that the caret is in. Otherwise, it undents all the lines containing highlighted text.

Lines that do not start with white space are not affected.

About Text Processing


The Options Menu

This item on the menu bar contains various system configuration options. Not all the items will appear if you don't have a file open.

Options Current File/Window Modes

Options Default File/Window Modes

Options Reset File/Window Modes

Options Screen Font

Options Status Bar

Options Tool Bar

Options Key Mapping

Options DDE Server


Options Current File/Window Modes Command
Options Current File/Window Modes

Starts a dialog that allows you to configure the modes that apply to the current window, and to the file that is being shown in the current window.

Default command key:	None

About File and Windows Modes


Options Default File/Window Modes Command
Options Default File/Window Modes

Starts a dialog that allows you to configure the modes that PFE applies to windows and files when you open existing files or create new ones.

Default command key:	None

About File and Windows Modes


The Options Reset File/Window Modes Command
Options Reset File/Window Modes

Resets the window modes that apply to the current window, and the file modes that apply to the file it's showing, to the default values.

Default command key:	None

If the current window is showing a file that has a file name associated with it, the modes set are those that match the file type.

If the window is showing a file that so far has no name associated, the modes set are those appropriate to newly-created files. In all other cases, the modes used are those for files with no specific file type.

About File and Windows Modes


Options Status Bar Command
Options Status Bar

Turns display of the status bar on or off

Default command key:	None

If the menu option is checked, the status bar will be visible.

About The Status Bar


Options Screen Font Command
Options Screen Font

Shows a popup sub-menu that allows you to set the details of the font that PFE uses in windows.

PFE uses the same screen font in all windows. The details you set are recorded, and will automatically be uses the next time you start PFE.

ANSI

OEM

System

Other

About Screen Fonts


Options Screen Font Ansi Command
Options Screen Font ANSI

Specifies that text is to be shown using the system's standard ANSI font. This will commonly be a Courier typeface, but this will be system-dependent.

Default command key:	None

About Screen Fonts


Options Screen Font OEM Command
Options Screen Font OEM

Specifies that text is to be shown using the system's standard OEM font.

Default command key:	None

About Screen Fonts


Options Screen Font System Command
Options Screen Font System

Specifies that text is to be shown using the standard fixed pitch system font.

Default command key:	None

About Screen Fonts


Options Screen Font Other Command
Options Screen Font Other

Lets you select any available fixed pitch screen font to use in all edit windows.

Default command key:	None

The command starts a standard dialog that allows you to specify the typeface to be used,  the type style (i.e. regular, bold or italic), and the type size. The selection applies to all windows.

About Screen Fonts


Options Tool Bar Command
Options Tool Bar

Shows a popup sub-menu that contains items used to control the position and appearance of the tool bar.

PFE records the state of the tool bar, and will set it to that state automatically when you next start it.

Options Tool Bar Hide

Options Tool Bar Show

Options Tool Bar Top

Options Tool Bar Bottom

Options Tool Bar Left

Options Tool Bar Right

Options Tool Bar Floating

About The Tool Bar


Options Tool Bar Hide Command
Options Tool Bar Hide

Removes the tool bar from the screen.

Default command key:	None

About The Tool Bar


Options Tool Bar Show Command
Options Tool Bar Show

Makes the tool bar visible on the screen in its last position.

Default command key:	None

About The Tool Bar


Options Tool Bar Top Command
Options Tool Bar Top

Sets the tool bar to appear as a bar along the top edge of the main PFE window.

Default command key:	None

Tool bar action:	Click + Drag

About The Tool Bar


Options Tool Bar Bottom Command
Options Tool Bar Bottom

Sets the tool bar to appear as a bar along the bottom edge of the main PFE window.

Default command key:	None

Tool bar action:	Click + Drag

About The Tool Bar


Options Tool Bar Left Command
Options Tool Bar Left

Sets the tool bar to appear as a bar down the left edge of the main PFE window.

Default command key:	None

Tool bar action:	Click + Drag

About The Tool Bar


Options Tool Bar Right Command
Options Tool Bar Right

Sets the tool bar to appear as a bar down the right edge of the main PFE window.

Default command key:	None

Tool bar action:	Click + Drag

About The Tool Bar


Options Tool Bar Floating Command
Options Tool Bar Floating

Sets the tool bar to appear as a floating window that you can position anywhere within the main PFE window.

Default command key:	None

Tool bar action:	Click + Drag

A floating tool bar window always remains visible above any edit windows.

About The Tool Bar


Options Key Mapping Command
Options Key Mapping

Maps keys to functions.

Default command key:	None

The command starts a dialog that enables you to set which operations are to be performed when you press particular keys. You can save the mappings you specify so that PFE will use them automatically the next time you start it. You can also save them to as individual key mapping files, which you can load for specific purposes as you require.

By default, PFE uses a set of built-in key mappings.

About Key Mapping


Options DDE Server Command
Options DDE Server

Turns the DDE server facilities on and off.

Default command key:	None

This command can be used at any time to start and stop PFE's DDE server system. Normally, PFE will act as a DDE server by default, but if you've configured the system to run multiple instances by default, or started PFE with a "/m" command line option, the DDE server will not be running.

The menu item will be checked if the DDE server is running. You should normally try to have only one instance of PFE that is a DDE server running at any time, as it's not predictable which one another application will connect to.

Controlling PFE Over A DDE Link


The Template Menu

This menu item contains options that relate to handling templates. Not all the options will be shown if you don't have any files open.

Template Attach File

Template Detach File

Template Create File

Template Save File

Template Insert

Template Edit

Template New

Template Store

Template Store As

Template Delete

Template Insert Mark

Template Find Mark

About Templates


Template Attach File Command
Template Attach File

Attaches a template file, loading into memory so the templates within it can be used.

Default command key:	None

The command starts a dialog that allows you to browse the files on your disk for template files, which have type ".tpl".

You can arrange for PFE automatically to attach the template files you use frequently, and also automatically to attach one template file specific to the directory you start it in.

About Templates


Template Detach File Command
Template Detach File

Detaches a template file, unloading it from memory.

Default command key:	None

The command starts a dialog that allows you to specify which attached template files you wish to detach. Once a template file is detached, you cannot use the templates it contains.

You can't detach a template file if you're currently editing any of the templates it contains. You will need to save any changes you want to keep with the Template Store or Template Store As commands, and then close the windows.

About Templates


Template Create File Command
Template Create File

Creates an empty template file and automatically attaches it.

Default command key:	None

The command starts a dialog that allows you to choose the name of the template file to create. This should have a file type of ".tpl". PFE will create the file on disk and initialise it.

Template files do not contain pure text, and this is the only method by which you can create them.

About Templates


Template Save File Command
Template Save File

Saves a template file to disk after you have edited its contents

Default command key:	None

The command starts a dialog that shows you the names of the attached template files that have changed. You can choose which of them to save.

Template operations such as edit, delete, new and store work only the copy of the template file in memory. Any changes you make are not recorded permanently until you use this command.

About Templates


Template Insert Command
Template Insert

Inserts a template from an attached template file into a window.

Default command key:	F9

Tool bar action:

The command starts a dialog that shows you the names of the attached template files, and the templates they contain. You can select any template from any file, then click OK to action the insert.

The template text is inserted into the current window at the position of the caret. Unlike the case of inserting a file from disk, the caret is left positioned at the start of the inserted text: this allows you to use the Template Find Mark command to fill in the positions marked as needing text input.

About Templates


Template Edit Command
Template Edit

Edits a template contained in an attached template file.

Default command key:	None

Tool bar action:	Ctrl +

The command starts a dialog that shows you the names of the attached template files, and the templates they contain. You can select any template from any file, then press OK to edit it.

PFE will create a new window, and copy the text of the template into it. You can edit the template as you wish; then, when you've made the changes, you can use the Template Store command to update the in-memory copy of the template file.

Note that any changes you make will not be recorded permanently in the disk copy of the template file until you use the Template Save File command.

About Templates


Template New Command
Template New

Creates a new, empty window in which you can type the text of a new template.

Default command key:	None

Tool bar action:	Shift +

The window created is not associated with either a template name, or a template file. To record what you've typed, you will need to use the Template Store As command to name the template and place it in a specific template file.

About Templates


Template Store Command
Template Store

Stores a template that you've been editing into the in-memory copy of the template file that it is associated with.

Default command key:	None

The previous version of the template that the template file contains will be overwritten by this command.

Note that the template file on disk is not altered by this command. To save your changes permanently, you next need to use the Template Save File command.

If you created the window you're editing the template in with the Template New command, and haven't yet stored the template in a template file, this command will act like the Template Store As command.

About Templates


Template Store As Command
Template Store As

Stores a template that you've been editing into the in-memory copy of a template file, allowing you to specify both the template file, and the name of the template.

Default command key:	None

The command starts a dialog that lets you specify the details of the operation. You should first select which of the attached template files you want to store the template file in, then specify the template name.

You can select the name of an existing template if you wish; as this will overwrite the previous contents, PFE will ask you to confirm that you really want to do this.

Note that the template file on disk is not altered by this command. To save your changes permanently, you next need to use the Template Save File command.

About Templates


Template Delete Command
Template Delete

Deletes templates from the in-memory copy of any attached template file

Default command key:	None

The command starts a dialog that lets you specify the details of the operation. You should first select which of the attached template files you want to delete templates from, then select one or more template names from the list of those it contains.

Note that the template file on disk is not altered by this command. To save your changes permanently, you next need to use the Template Save File command.

About Templates


Template Insert Mark Command
Template Insert Mark

Inserts a template mark into a template that you're editing

Default command key:	F6

A template mark is a sequence of characters ("<???>") that you can use to mark positions in a template where you need to put variable details after you've inserted it.

When you insert a template into a file, you can use the Template Find Mark command to quickly move to all the template marks in turn and replace them with whatever is appropriate.

About Templates


Template Find Mark Command
Template Find Mark

Moves the caret to the next template mark in a file or a template and highlights it

Default command key:	F4

A template mark is a sequence of characters ("<???>") that you can use to mark positions in a template where you need to put variable details after you've inserted it.

When you insert a template into a file, you can use this command to quickly move to all the template marks in turn and replace them with whatever is appropriate.

About Templates


The Execute Menu

This menu contains items that relate to running DOS commands and starting Windows applications, and also several for handling keyboard macros.

In a later release of PFE, keyboard macro items will be moved to their own Macro menu.

Execute DOS Command to Window

Execute Repeat DOS Command to Window

Execute DOS Prompt

Execute Launch Application

Execute Launch Windows Tool

Execute Configure Windows Tools

Execute Start Keyboard Recorder

Execute Stop Keyboard Recorder

Execute Replay Keyboard Record

Execute Control Panel

Execute File Manager

About Running DOS Commands

About Launching Windows Applications

About Windows Tools

About Keyboard Macros


Execute DOS Command To Window Command
Execute DOS Command To Window

Executes a DOS application, such as a compiler or a built in command, and captures the output in a window.

Default command key:	F11

Tool bar action:

The command starts a dialog that lets you give the command line to be executed. It can be any DOS command, including built-in ones like "dir".

You can specify the working directory that the command is to run in. This affects only the DOS command - PFE itself will still use its previous working directory.

When you start the dialog, PFE sets the command string and the proposed working directory name to the values you set the last time you used it in this or a previous session.

You may execute only one DOS command at a time. Until the command completes, PFE will reject attempts to start another.

This command is not available if you are running the Windows/16 version of PFE in the Win16 subsystem of Windows/NT.

About Running DOS Commands


Execute Repeat Last DOS Command To Window Command
Execute Repeat DOS Command To Window

Repeats the last DOS command you ran with the Execute DOS Command To Window command, capturing the command's output.

Default command key:	None

Tool bar action:	Shift +

PFE will repeat the last command exactly, and will show you the command output in a window when it completes. If you have not previously run a command, PFE will act as if you selected the  Execute DOS Command To Window command and will show you the dialog.

About Running DOS Commands


Execute DOS Prompt

Starts a separate task running the DOS command processor

Default command key:	Ctrl+F11

Tool bar action:

PFE starts a new task, which runs completely independently from it. The task will run whatever is specified in the COMSPEC environment variable; if this is not set, command.com is used for the Windows/16 version, and cmd.exe for the Windows/NT version.

About Running DOS Commands


Execute Launch Application Command
Execute Launch Application

Launches a DOS or Windows application as a task running independently of PFE

Default command key:	Shift+F11

Tool bar action:

The command starts a dialog that lets you give the command line to be executed. It can specify any DOS or Windows application.

You can specify the working directory that the application is to run in. This affects only the application - PFE itself will still use its previous working directory.

When you start the dialog, PFE sets the command string and the proposed working directory name to the values you set the last time you used it in this or a previous session.

Applications launched by this command run totally independently of PFE, and their output is not captured. To run something like a compiler, whose output you want to catch in an edit window, use the Execute DOS Command To Window command.

About Launching Windows Applications


Execute Launch Windows Tool

Launches one of the Windows applications configured in the list of Windows Tools

Default command key:	F12

Tool bar action:	Shift +

This command gives a quick way of starting a pre-defined Windows application such as the Dialog Editor or a debugger.

When you select it, PFE shows you a dialog that gives a list of the configured Windows tools. You can select one from the list, modify the associated command line and working directory if you wish, and press OK to launch it.

Applications launched in this way run independently of PFE, and their output is not captured. To run something like a compiler, whose output you want to catch in an edit window, use the Execute DOS Command To Window command.

To set up or edit the list of available Windows tools, use the Execute Configure Windows Tools command.

About Windows Tools


Execute Configure Windows Tools

Configures details of the defined Windows Tools.

Default command key:	Shift+F12

Tool bar action:	Ctrl +

This command starts a dialog that lets you add or delete entries from the list of Windows tools, or modify existing ones.

About Windows Tools


Execute Start Keyboard Recorder Command
Execute Start Keyboard Recorder

Starts recording your key presses and menu selections as a keyboard macro, which you can then replay

Default command key:	Shift+F7

Tool bar action:

Once you've selected this command, PFE records all the keys you press, and all the menu selections you make, in its keyboard macro buffer. When you've performed all the actions you want recorded, use the Execute Stop Keyboard Recorder command to turn recording off.

You can record a maximum of 1024 key strokes or menu actions. Two-character command sequences count as a single stroke.

Things that you type in dialog boxes are not recorded, nor are mouse actions.

Once a keyboard macro has been recorded, you can replay it as often as you wish with the Execute Replay Keyboard Record command.

In this version of PFE, any previously stored keyboard macro is deleted when you turn recording on. Also, you cannot save the actions you record permanently.

About Keyboard Macros


Execute Stop Keyboard Recorder Command
Execute Stop Keyboard Recorder

Stops recording your key presses and menu selections as a keyboard macro

Default command key:	Ctrl+F7

Tool bar action:

Once you've selected this command, PFE no longer records the keys you press, and the menu selections you make, in its keyboard macro buffer.

Once a keyboard macro has been recorded, you can replay it as often as you wish with the Execute Replay Keyboard Record command.

About Keyboard Macros


Execute Replay Keyboard Record Command
Execute Replay Keyboard Record

Replays the keyboard macro

Default command key:	F7

Tool bar action:	Shift +

The command causes PFE to replay all the key presses and menu selections that you've recorded. If any operation causes an error - for example, you might replay a File Save command when no file is open - the replay is terminated.

PFE does not record what you type in dialog boxes; thus, if any recorded key starts a dialog, you will need to fill in the details whenever you replay the macro. Pressing the Cancel button in any dialog will cause PFE to end the macro replay.

About Keyboard Macros


Execute Control Panel Command
Execute Control Panel

Starts the standard Windows Control Panel application in control.exe


Execute File Manager Command
Execute File Manager

Starts the standard Windows File Manager application in winfile.exe


The Window Menu

This menu item contains commands relevant to handling edit windows. It does not appear if you have no files open.

Window Tile Horizontal

Window Tile Vertical

Window Cascade

Window Iconize All

Window Arrange Icons

Window Select

Window Next

Window Duplicate

Window Close

Window Widen

Window Centre Caret

The Window List

About Window Manipulation


Window Tile Horizontal Command
Window Tile Horizontal

Arranges all the non-iconic edit windows in a tile pattern, placing them side by side so that each is as deep as possible.

Default command key:	Shift+F4

About Window Manipulation


Window Tile Vertical Command
Window Tile Vertical

Arranges all the non-iconic edit windows in a tile pattern, placing them one above the other so that each is a wide as possible.

Default command key:	None

About Window Manipulation


Window Cascade Command
Window Cascade

Arranges all non-iconic edit windows in a cascade pattern

Default command key:	Shift+F5

About Window Manipulation


Window Iconize All Command
Window Iconize All

Makes all edit windows into icons

Default command key:	None

About Window Manipulation


Window Arrange Icons Command
Window Arrange Icons

Arranges all iconized edit windows so that their icons are visible, in rows at the bottom of the PFE desktop.

Default command key:	None

Windows that are not icons are not affected by this command

About Window Manipulation


Window Select Command
Window Select

Allows you to choose between many open windows with a selection dialog

Default command key:	Ctrl+W

This command starts a dialog that lists the window captions of all the edit windows. You can refine the list to show only windows showing files that have associated names, windows showing un-named files, windows showing templates, or windows showing command output. You can also choose to see only windows that have been altered.

You can select the window you want to see from the dialog, and press the OK button to switch to it.


Window Next Command
Window Next

Moves the focus to the next edit window that is not an icon.

Default command key:	None

This command will not activate any window that is currently iconic. Windows are activated in the order in which PFE maintains their control information, which will not be the same as the ordering used by Windows itself.

About Window Manipulation


Window Duplicate Command
Window Duplicate

Makes an exact copy of the current window

Default command key:	None

The duplicate window created by this command shows the same file, with the caret in exactly the same place. All aspects of the new window are identical to the original.

You can produce as many duplicates of a window as you wish, and edit the same file in each of them,

About Window Manipulation


Window Close Command
Window Close

Closes the current window

Default command key:	None

If the window that you close is the only one showing that particular file, this command acts as if you'd used the File Close command. PFE will check whether the file has been changed, and will give you the opportunity of saving them.

About Window Manipulation


Window Widen Command
Window Widen

Alters the size and horizontal position of the current window to make it as wide as possible within the PFE desktop

Default command key:	None

The window's vertical size and position are not affected

About Window Manipulation


Window Centre Caret Command
Window Centre Caret

Moves the data being shown in the current window so that the caret is visible, and the line containing it is as close as possible to the middle of the window

Default command key:	None

About Window Manipulation


Window List

This is not a single menu item, but a list that is automatically added to the end of the Window menu whenever you open a window.

The list shows the window captions for up to 9 of the windows that you have open at the moment. You can switch to one of them simply by clicking the appropriate menu item.

If you have more than 9 windows open, a further command More Windows is added to the end of the list. This command is identical in effect to the Window Select command; it starts a dialog that lets you choose the window to activate.


The Help Menu

This menu lets you obtain help on using PFE, and also lets you run the Windows help engine on up to five help files of your own choice.

If you wish, you can always use the Help Contents command to enter the help system, and navigate through the information to find what you want. To help you locate things quickly, though, various other commands allow you to enter the help system at specific points; for example, the help commands command is useful if you want to look up a menu command to see what it does.

You can also obtain context-specific help when you're working in dialog boxes by either clicking on their Help buttons, or pressing the F1 key. Many message boxes that ask you questions will also show you help if you press the F1 key.

Help Contents

Help Search For Help On

Help How To Use Help

Help Commands

Help Procedures

Help Reference

Help About

User-Configurable Items


Help Contents Command
Help Contents

Starts the Windows help engine to give help on PFE. The help file is opened at the Contents page

Default command key:	F1


Help Search For Help On Command
Help Search For Help On

Starts a dialog that allows you to search the PFE help file for a given keyword

Default command key:	None

You can type the keyword you want to search for, or you can select one of the ones shown in the list, then click the Show Topics button to see all the help topics that refer to that keyword.

You can then select the topic that interests you, and open the help file to show it by clicking the Goto Topic button


Help How To Use Help Command
Help How To Use Help

Starts the Windows help engine to give you help on how the help system works

Default command key:	None


Help Commands Command
Help Commands

Starts the Windows help engine to give help on PFE's menu commands.

Default command key:	None


Help Procedures Command
Help Procedures

Starts the Windows help engine to give help on how you perform various tasks using PFE.

Default command key:	None


Help Reference Command
Help Reference

Starts the Windows help engine to give help on PFE. The help file is opened at the Reference section, which gives you such items as the list of functions that you can bind to keys, and so on

Default command key:	None


Help About Command
Help About

Starts a dialog that gives you information about the particular version of PFE that you're using.

Default command key:	None


Help User-Configurable Items

This is not a single Help menu item, but a list that you can define for yourself, so that you can access the help files that you want to work with quickly from PFE's own help menu.

PFE allows you to define up to five help files, and associate each with a menu item that is appended to the end of the Help menu.

To set up your own list of help files, you need to edit the [help-files] section of the initialisation file pfe.ini, which is held in your Windows directory


Reference Not Available

Sorry, the material for this section is not yet complete


Procedures

This section of the help file contains overviews and descriptive material that will explain the features of PFE, and tell you the exact steps you need to take to achieve results.

In many cases, the descriptions will discuss running a dialog to perform an action. These topics will have links that take to step-by-step instructions for working with the dialogs; you can also access these instructions by clicking the Help button in the dialog itself, or by pressing the F1 key.

Starting Up

Starting PFE

Running Single Or Multiple Instances

Specifying A Key Mapping File On The Command Line

Command Line Options

File Operations

Opening Existing Files From File Manager

Opening Existing Files From PFE

Creating A New File

Inserting An Existing File

Changing An Associated File Name

Saving A File To Disk

Closing A File

Mailing A File

Printing A File

Working With Unix Format Files

Handling Text

Typing Text

Deleting Text

Selecting Text

Cutting, Copying and Pasting Text

Dragging And Dropping Text

Finding Text

Replacing Text

Text Processing Operations

Templates

File And Window Modes

Moving About

Moving To Specific Lines

Finding Text

System Control

Window Manipulation

Screen Fonts

The Status Bar

The Tool Bar

Key Mapping

Keyboard Macros

Ending A PFE Session

Exiting Windows

Running Other Applications

Running DOS Commands

Launching Windows Applications

Windows Tools

DDE

Controlling PFE Over A DDE Link

Manual Configuration

Altering The Initialisation File


Starting PFE

Like any other Windows application, PFE can be started in a variety of ways.

-	From Program Manager you can start it from an icon in a program group

-	From File Manager you can start it by double clicking on its name. You can also start it up to edit one or more files by dropping their names onto the PFE program's name

You can also start it with the File Run commands of either of these applications; and from any other application that can launch programs.

However you start PFE, you can if you wish include on its command line a list of files that it is to open. If you do give a list, PFE will open each file in turn. Filenames given on the command line may include the normal DOS wildcard characters, and PFE will open all files whose names match.

By default, only one instance of PFE will run at a time. When you start a second one, it will pass control to the first, commanding it to open any files you've given on the command line.

If you wish, you can have PFE perform some file actions automatically as it starts up. The auto-filesetting in the [options] section of the initialisation file pfe.ini can be used to either have PFE create an empty, unnamed window, or show you the dialog for opening files when you start it with no file names on the command line.

Running Single Or Multiple Instances

Specifying A Key Mapping File On The Command Line

Command Line Options


Running Single Or Multiple Instances

By default, PFE attempts to run only one instance of itself at any time. When you start it for a second time, the first instance is detected, and it is activated. Any file names that you gave on the command line are passed to this first instance across a DDE link.

In many cases, you'll find this a convenient way to work, as it reduces the clutter on your screen, and you don't have to worry about which version of PFE is editing what file.

However, if you're working on several things at the same time, it can be distracting to have unrelated files being edited in the same instance of the editor, so PFE gives you the choice of running multiple copies of itself when you want.

INI FILE CONFIGURATION

The easiest way to set PFE up to run with multiple copies of itself is to edit the initialisation file pfe.ini, which is held in your Windows directory. Including the line

run-mode=1

in the [options] section tells PFE always to start new instances of itself.

COMMAND LINE CONFIGURATION

You can also control how PFE starts by using command line options, which override the initialisation file values. If you specify the "/m" option, PFE will always start a new instance; if you specify "/s", it will always try to activate a previous instance.

You may find it convenient to set up several icons in your Program Manager groups with different command line options. For example, you could have a general icon with a command line of simply

pfe

to start PFE up for general editing. To edit your system files, you might have icons with command lines like:

pfe /m c:\windows\win.ini

pfe /m c:\autoexec.bat

and so on. These will start independent instances of PFE to edit these files, without getting in the way of any other editing work you're engaged in.

DDE CONSIDERATIONS

When you start PFE with the "/m" command line option, or if you don't use a command line option and have run-mode set to 1 in your initialisation file, the instance of PFE that starts will not run as a DDE server. This is so that any instance you start later with a "/s" switch will not activate this instance instead.

If you want an instance of PFE to run as a DDE server, you can either start PFE with a "/s" option (if run-mode is not set to 0) or use the Options DDE Server command to start any instance running a server.

Note that if you have more than one instance of PFE running as a DDE server, it's not predictable which of them will be connected to by another application. If you do use DDE, it's normally best to ensure that only one instance of PFE runs, or only one of several instances is acting as a server.


Specifying A Key Mapping File On The Command Line

By default, PFE will look for a file called pfe.key in your Windows directory when it starts, and will load the key mappings that it contains.

To load mappings from a different file on start-up, or to force PFE to use the built-in defaults described in this help file, you can use the "/k" command line option to name any key map file. For example, starting PFE with a command line

pfe /k c:\keymaps\uemap.key

would load the key mappings in the file c:\keymaps\uemap.key. If you have a key map file pfe.key, but want to use the built-in key mappings described in this help file instead, use the "/k" option and give the filename as the single character "-" (minus).

Note that when you use the "/k" option, the dialog started by the Options Key Mapping command will not save changed mappings to the file you specify, or to pfe.key, by default. When saving you will need always to give an explicit file name.


Opening Existing Files From File Manager

If you have already started PFE running, you can pass files to it for editing from File Manager using the drag-and-drop technique. You can also do this from any other application that can act as a drag-and-drop server.

To open one or more files in this way, select them in the File Manager window; then click the left mouse button down while over one of the names and hold it down. Move the mouse cursor to anywhere in PFE's window and release the mouse button.

PFE will open each of the files in turn. They will all be opened such that you can alter them, except for files whose directory entries have the read-only attribute set, which will be opened in read-only mode.


Opening Existing Files
Opening Existing Files From PFE

To start editing one or more existing files, use the File Open command. This starts a standard dialog that allows you to move around your directories to find the files you want to edit.

If you want to prevent yourself accidentally changing the files, click the Read Only box to tell PFE to open them all in read-only mode. Alternatively, you can use the File View command, which automatically does this. Whatever options you use, any file whose directory attributes include Read Only will always be opened in read-only mode.

Normally, the dialogs that open and save files will show you all the files that exist in each directory. You can arrange to set up your own selections by configuring the filter list that appears in the dialogs.

When each file is loaded, PFE looks at the file type to determine such things as the tab size to use, whether to treat the file as C language source, and so on. You can configure the settings it uses for different file types with the Options Default File/Window Modes command.

If you select a file that is already open, PFE will not load a new copy from disk. Instead, it will activate one of the windows that are currently showing the file.

PFE will examine the contents of the file specified to see if it is a template file. If it is, it will be attached rather than opened for editing.

PFE can open files that are stored in the normal MS-DOS format (using CR-LF bytes to mark the end of each line) or in Unix format (using a single LF byte) automatically.


Configuring The File Type Filters

Whenever you use one of the File Open, File View, File Insert, File Save As or File Write commands, PFE will show you a standard Windows dialog that allows you choose the filename to use, moving around all your directories.

The possible file names in the current directory are shown in the list on the left; the files shown in this list are determined by your selection from the List Files of Type list at bottom left.

By default, there will be only one item in the list, which selects all files, using a pattern of "*.*". If you wish, you can configure this list to let you select a smaller group of files: for example, if you program in C, you might wish to see only files with types of ".c" and ".h" in one group, and files of type ".dlg" in another.

The contents of the list are determined by the [fileopen-filters] section of the file pfe.ini, which is held in your Windows directory.


Creating A New File

The File New command opens a new, empty window in which you can type.

The window will not initially be associated with a file name. In order to save what it contains to disk, you'll need to use a command such as File Save As, which allows you to set the file name.

When the window is created, PFE applies the set of modes - that is, the tab size, wrap column, and other details - that are defined for "new files". You can use the Options Current File/Window Modes command to change them for the new window; or you can change the default settings using the Options Default File/Window Modes command.


Inserting An Existing File

To insert an existing file into the window that you're editing, place the caret to the point at which you want the insertion to be made, then use the File Insert command.

This starts a standard dialog that allows you to move around your directories to find the file you want to insert. PFE can insert files that are in normal MS-DOS format (using CR-LF bytes to mark the ends of lines) or in Unix format (using single LF bytes) automatically.

PFE will insert the file into the window, leaving the caret positioned after the last character inserted.

By default, the dialog will show you all the files existing in each directory, but you can configure it to show you a restricted set.

If the file to be inserted is a template file, PFE will reject the operation.


Changing A File Name

When you edit a file, PFE will associate the name of the file with all the windows that show it. When you then use the File Save command to write the file to disk, PFE will use the associated name when it opens the file.

Some windows - such as those that you've created with the File New command, or those holding DOS command output produced by the Execute DOS Command To Window command - will not have file names associated with them. Or you may want to change the associated name to something else.

You can change the file name associated with a window, and save it to disk at the same time, by using the File Save As command. This runs a dialog that allows you to specify a file name; after saving the file, that file name is associated with all the windows showing the same file.

Alternatively, you can change the file name without writing to disk by using the File Name command. This also runs a dialog that lets you specify the associated file name, but makes no changes to your disk.

Whatever method you use to change the name of a file, PFE will examine the name and change the file and window modes that apply to the file, and to the current window, to match the new file type.


Saving A File To Disk

To save a file to disk you have a choice of two commands.

-	The File Save command will save the contents of the current window to disk, using the file name that's associated with the window. Any previous contents of the file will be lost.

-	The File Save As command prompts you to supply the name of the disk file to write to. If you choose an existing file, PFE will warn you and ask if you really intend to overwrite it. The file name you give then becomes associated with the window.

If the window doesn't have a file name associated with it yet, both commands will ask for a file name. You can also associate a file name with a window at any time, without writing it to disk, using the File Name command.

If the current window contains a template, you won't be able to use the File Save or File Save As command. Instead, use the Template Store or Template Store As commands.

By default, you can't use the File Save command if you haven't changed the file. You can configure PFE to allow you to do this by placing the line

allow-save-always=1

in the [options] section of the initialisation file pfe.ini, which is held in your Windows directory.

Setting The Format of the Saved File


Setting The Format of a Saved File

PFE can save files in either of two formats:

-	DOS Format writes the file so that each line is terminated by a carriage-return byte and a line-feed byte. This is the normal format for DOS files, and you should use this if you want the file to be readable by other applications.

-	UNIX Format writes the file so that each line is terminated by only a line-feed byte. This is the format used in UNIX systems; however, the file probably won't be usable with other DOS or Windows applications.

The format that PFE will use to save a file is shown in the status bar.

There are several ways to set the format that a file will be saved in:

-	By default, PFE will detect that a file is in Unix format when it is opened, and will set the save format to "Unix".

-	You can change between DOS and Unix formats by double-clicking the left mouse button in the format area of the status bar.

-	You can use the Options Current File/Window Modes command to change the format of the current file.

-	You can use the Options Default File/Window Modes command to set the format for files of specific types.

Working With Unix Format Files


Closing A File

When you've finished editing a file, you can close it with the File Close command. PFE will close all the windows that are showing the same file as the current window.

If you haven't yet saved some changes to the file, PFE will give you the opportunity to either write the file to disk before it is closed, or to abandon the operation.

If you want to close all the files that you are working on, use the File Close All command.

Closing the last, or only, window showing a file has the same effect as the File Close command.

If you're using PFE as an edit server for some other application, you may find it convenient to have the main window become an icon when you've closed all the files you've been working with. You can select this by including the line

minimize-on-empty=1

in the [options] section of the initialisation file pfe.ini in your Windows directory.


Mailing A File

If you have a MAPI-compliant mail system, such as Microsoft Mail 3.0, installed on your system, you can mail files to other people directly from PFE.

To mail the file shown in the current window, simply select the File Mail command. PFE writes the data to a temporary file, and calls the mail system to send it as an attachment in a mail message.

If you aren't currently running the mail application, or if you aren't logged in to your mailbox, you'll see a dialog that asks you for your mail username and password. You'll then see the standard mail composition window, with the file you're sending shown in the message as the PFE icon, and you can add text or other attachments as you want.

If you're editing a file that already exists on your disk, this copy is not altered by this process.

Note that you'll need to have sufficient room on your disk for PFE to save the entire contents of the current window as a temporary file. This temporary file will be deleted once the mail process is complete.


Printing A File

You can print the file that is being shown in an edit window by using the File Print menu command. PFE will show you a dialog that lets you choose what part of the file you want to print: you can select to print either all of it, or only the part that you've selected, or the part between two line numbers.

You can specify the last line of the file as the word end in the rightmost of the line range edit controls.

The dialog box shows you the name of the printer that PFE is currently using - if you haven't specified otherwise, this will be your system default printer.

The file is printed using the same tab width that is being used in the window, and with line numbers if you have line numbering turned on. You can configure both these settings with Options Current File/Window Modes menu command.

You can quickly turn line numbering on or off by clicking the line number toggle button on the tool bar.

Setting Up The Printer

Selecting A Printer Font


Setting Up The Printer

To configure the printer that PFE is to use, use the File Print Setup menu command or click the Setup button in the dialog started by the File Print menu command. This will start the printer setup dialog.

The dialog lets you specify:

-	The printer you wish to use

-	What page margins are to be applied when you print on this device

-	What font is to be used when you print to this device

You will also be able to run the printer's own setup dialog to set device-specific information.

All the settings that you make in this dialog are remembered by PFE on a per-printer basis, so you can have different settings for different printers.

The Printer Setup Dialog


Selecting A Printer Font

Clicking the Fonts button in the dialog started by the File Print Setup command starts a sub-dialog that lets you select the font to be used with the selected printer device.

Because PFE is a text editor rather than a word processor, you're restricted to choosing fixed pitch fonts, where the characters are all the same width.

PFE records the values you set in this dialog with the selected printer: the next time you choose this device, it will use the same settings.

The Printer Font Dialog


Working With Unix Format Files

Under MS-DOS, files are normally stored with the end of every line indicated by a Carriage-Return (CR) byte followed by a Line-Feed byte (LF). Most MS-DOS and Windows programs expect files to be in this format, and will not work correctly otherwise.

However, you may wish sometimes to handle files in Unix format, where lines are terminated by a single LF byte. You may have downloaded a file from a Unix system that needs conversion, or you may be using PFE to edit files on an NFS-mounted Unix file system, for example.

PFE is able to handle files in either MS-DOS or Unix format (or indeed, files using a combination of formats). By default PFE will detect that a file is in Unix format, and automatically set that format for when the file is saved.

The format that PFE will use to save a file in is shown in the status bar. You can quickly change the format by double-clicking the left mouse button in the appropriate area.

Opening Unix Format Files

Saving Files In Unix Format

Detecting Unix Format Automatically


Opening Unix Format Files

PFE handles opening and reading files in Unix format automatically, and you need take no special action to tell it that the file you are opening or inserting is a Unix file.

Depending on how have you have configured the optional file modes associated with the file type of the file being opened, PFE may set the Save in UNIX format mode on the file, so that when you write it to disk, lines will be terminated by single line-feed characters.

By default, files that are detected as being in Unix format when they are opened will be saved in Unix format.


Saving Files In Unix Format

PFE is able to write files to disk in either the normal MS-DOS format, using CR-LF as a line terminator, or in Unix format, using LF.

The format used to write a file is determined by one of the file modes - the Save in Unix Format mode - that you can associate with a file. You can set this mode in several ways:

-	You can check the Unix format box in the dialog shown when you use the File Save As command. This will save the current file in UNIX format, and will also set the Save in Unix Format mode so that this becomes the default format when you write the file to disk again

-	You can double click the left mouse button in the area of the status bar that shows the file format until it shows the word "Unix".

-	You can check the Save in Unix Format box in the dialog started by the Options Current File/Window Modes command. This also makes Unix format the default for every time you write the file to disk

-	You can have PFE set the mode automatically when the file is opened by using the Options Default File/Window Modes command. This lets you set the mode on either every file that you open, or only on those with specified file types


Detecting Unix Format Automatically

When opening a file, PFE looks at what characters are used to terminate a line. If the first line is terminated by a single Line-Feed character, PFE assumes that the file is in Unix format; otherwise, it will assume the file is in MS-DOS format.

Normally, if a file appear to be in Unix format when opened, PFE will automatically set the Save in Unix Format file mode, so that when you save the file it will be written in the same Unix format.

If you work with Unix files on your system, this will probably be what you want to happen. However, if you normally want to save files in DOS format, however they look originally, you can disable this feature by editing  the initialisation file pfe.ini in your Windows directory to include the line

auto-format=0

in the [options] section.


Typing Text

You can type text with PFE in the same way as for any other Windows application.

Normally, what you type appears on the screen, displacing other characters to the right if you're not at the end of a line. This is termed Insert mode.

If you prefer, you can switch to working in Overwrite mode, where a character you type will replace the one under the caret.

The mode is shown as either "INS" or "OVR" in the status bar. You can also tell by the shape of the caret: in insert mode it's a vertical line, and in overwrite mode it's a block.

You can switch between the two modes in several ways:

-	Pressing the Ins key changes from one mode to the other

-	Double clicking the left mouse button in the area of the status bar that shows the mode changes from one to the other

-	You can change between the two modes, and also change other settings for the current window, with the Options Current File/Window Modes command

-	You can set the default mode to use for files of specific types with the Options Default File/Window Modes command.

Remember that insert and overwrite modes apply to individual windows. You can have, for example, one window that shows a file in insert mode, and another showing the same file in insert mode if you wish.

Automatic Text Wrapping


Deleting Text

Pressing the Delete or Del keys will delete the character to the left of the caret, and move the caret left.

If you want delete an entire line or the last part of a line, there are two useful commands that let you do it in a single operation. The Edit Delete Line command deletes the entire line that the caret is in; the Edit Delete To End Of Line command deletes everything from the current position of the caret to the end of the line that contains it.

To delete a large area of text, you can select it with the keyboard or mouse and then press Delete or Del, or use the Edit Cut command.


Selecting Text

Like other Windows applications, PFE allows you to select an area of text and operate on it. The selected area appears highlighted.

You can select text using either a mouse, or with the keyboard. Also, the Edit Goto Line and Edit Find commands allow you to specify that all the text from where the caret starts to where it ends up is selected.

Selecting An Entire File

Selecting A Single Word

Selecting Using The Mouse

Selecting Using The Keyboard

Cancelling A Selection


Selecting An Entire File

To select the whole of the file shown in the current window, use the Edit Select All command. PFE will highlight all the text in the file, and move the caret to after the last character.


Selecting A Single Word

PFE gives you a quick way to select a single word in your text.

-	With a mouse, place the cursor anywhere within the word and double click the left mouse button

-	Alternatively, or if you don't have a mouse, move the caret to anywhere within the word and use the Edit Select Word command


Selecting Using The Mouse

To select some text with the mouse, hold down the left button and drag the cursor. PFE will scroll the window in the appropriate direction when you move outside the window area. All the text that you select will be shown highlighted.

To select a single word, place the mouse pointer anywhere within it and double-click the left mouse button.

You can quickly select a large area by holding down the Shift key as you click the left mouse button. PFE will select all the text from the initial position of the caret to where the mouse cursor is. Since PFE does not move the caret within the file as you scroll with the up and down arrows in the vertical scroll bar, this can be a convenient way to select large areas.

If you have already selected an area, holding the Shift key down while you press the left mouse button extends the selection to the position of the mouse cursor.

Remember that, although you can have an area of selected text in each of the files you have open, only one window from any particular file can have a selection.


Selecting Using The Keyboard

As with other Windows applications, PFE allows you to select text using the keyboard.

Holding down the Shift key while using the cursor keys will move the caret up and down in the current window, selecting all the text that you pass over. Normally the caret moves one character or line at a time; holding the Ctrl key down at the same time as the left or right cursor key will move the caret by one word at a time.

Holding down the Shift key while pressing the PgUp or PgDn keys will scroll the window by one window's worth of lines, selecting all the lines that are passed over. Holding the Ctrl key down at the same time will move you to the start or end of the file respectively.

Holding down the Shift key while pressing the Home and End keys will move the caret to the start or end of the current line respectively, selecting all the text passed over.

To select a complete word, move the caret to anywhere within it and use the Edit Select Word command.


Cancelling A Selection

To cancel a selected area of text and return it to unselected state, you should either click the left mouse button once anywhere in the window concerned; or press the 5 key on the numeric keyboard with Num Lock off.


Cutting, Copying and Pasting Text

PFE uses the standard Windows clipboard for cutting, copying and pasting text. You can move text around in one edit window; move it from one window to another; or transfer text to and from other applications.

You can select the text with the mouse or keyboard, and then operate on it with menu commands. An alternative, very quick way of moving and copying text, is to use PFE's drag and drop facility.

You can work with very large amounts of data when cutting, copying and pasting. If you are using an 80286 based system, the maximum amount of data that can be handled is 80 bytes less than 1 megabyte. On an 80386 or higher, the maximum size is 16 megabytes less 64 kilobytes. With the Windows/NT version of PFE there is effectively no limit.

However, you should normally work with small amounts of data, even if it means moving a large amount of text around in several operations instead of one. Clipboard data is stored by Windows in your system's main memory, and obviously the larger the amount you try to store, the more likely you are to run out of space. Also, because of the way Intel processors operate under Windows 3, PFE handles cutting, copying and pasting of more than 64 kilobytes of data significantly slower than smaller blocks.

Remember too that the clipboard is not emptied after you paste it into a file. This means that, when you exit PFE, you may still have a large amount of data stored in the clipboard taking up main memory space, which could cause you memory starvation problems when running other applications. You can reduce the amount of data stored in the clipboard by copying a single character to it before exiting from PFE; or you can use the Windows Clipboard Viewer application to empty the clipboard at any time.

Cutting Text To The Clipboard

Copying Text To The Clipboard

Pasting Text From The Clipboard

Dragging And Dropping Text


Cutting Text To The Clipboard

To cut some text from the current window and place it on the clipboard, you should first select it, then use the Edit Cut  command.

PFE will delete the selected text from the edit window after making a copy of it in the Windows clipboard. Anything that was previously held in the clipboard will be lost.


Copying Text To The Clipboard

To copy some text from the current window and place it on the clipboard, you should first select it, then use the Edit Copy  command.

PFE will duplicate the selected text in the clipboard, and leave the window unchanged.

By default, PFE leaves the selected text highlighted after this operation. If you prefer to have the highlighting removed, you should place the line

deselect-on-copy=1

in the [options] section of PFE's initialisation file pfe.ini, which is held in your Windows directory.


Pasting Text From The Clipboard

When the Windows clipboard contains some ASCII text (either put there from PFE or some other application) you can paste it into the file you're editing at the position of the caret with the Edit Paste command.

If you have selected any text prior to using this command, PFE will delete it before performing the paste operation.


Dragging And Dropping Text

If you have a mouse, a very quick way to move text around within a window is to use PFE's drag-and-drop facility, which lets you simply pick up text from one place and drop it where you want it.

To use drag-and-drop, you should do this:

1	Select the text you want to move or copy to another part of the window

2	Place the mouse cursor within the selected area. The cursor shape changes from an I-beam to an arrow to show that you can use drag and drop.

Press the left mouse button and hold it down. The cursor changes to the drag-and-drop cursor. If you want to copy the selected text rather than move it, you should also press and hold down the Ctrl key

3	Move the cursor to where you want to move or copy the text; the caret shows you the exact place where the text will go. Moving the mouse cursor outside the window will cause it scroll in the appropriate direction

4	When the caret is at the required location, release the left mouse button (if you're copying the text, make sure you hold the Ctrl key down until after you release the button).

If you decide that you didn't really want to carry out the operation once you've started it, release the Ctrl key if you're holding it down, and press the ESCAPE key. The mouse cursor will return to its normal shape, and you can now release the mouse button without changing the file.

Note that the selected text is not copied to the clipboard when you perform a drag-and-drop; anything you have in the clipboard already will be unaffected.

Normally, PFE will move the selected text unless you hold the Ctrl key down when releasing the mouse button. If you prefer, you can change this so that text is copied by default, and moved only if the Ctrl key is down. To do this, edit the pfe.ini initialisation file in your Windows directory to include the following line in the [options] section

dragdrop-flip=1

Depending on how responsive your system is, and how you like to work with an editor, you may prefer to have the drag and drop facility turned off. To do this, edit the pfe.ini file in your Windows directory to include the line

use-dragdrop=0

in the [options] section. If drag and drop is not available, the mouse cursor does not change shape when it is over highlighted text.


Finding Text

To search for an occurrence of some text in a window, place the caret at the point where you want the search to start, and use the Edit Find command. This starts a standard Windows dialog that lets you specify what you want to look for, and other details.

The dialog box remains visible after you've made the search, enabling you to repeat it in the same or in another edit window.

The Edit Find Dialog

Finding Special Characters

Repeating A Find Operation


Finding Special Characters

When you're searching  you may want to look for occurrences of characters that you can't type in the edit control of the Find dialog. PFE lets you specify them using a special notation:

^n	represents the end of a line

^t	represents a TAB character

^^	represents the "^" character


Repeating A Find Operation

There are two ways of repeating a text search. Because the Find dialog remains visible until you explicitly dismiss it, you can repeat a search - either exactly or with changes - simply by pressing the OK button. You can perform the search in any window.

However, on standard VGA screens especially, the dialog can take a large amount of space, so you may prefer to dismiss it and use the Edit Repeat Last Find command to repeat a search. This command repeats the last search operation you did exactly.


Replacing Text

To search for an occurrence of some text in a window, and replace it with some different text, place the caret at the point where you want the search to start, and use the Edit Replace command. This starts a standard Windows dialog that lets you specify what you want to look for, what to replace it with, and other details.

The dialog box remains visible after you've performed the operation, so you can repeat the operation in the same or in another edit window.

The Edit Replace Dialog

Replacing Special Characters

Repeating A Replace Operation


Replacing Special Characters

When you're replacing text you may want to look for or insert characters that you can't type in the edit control of the Replace dialog. PFE lets you specify them using a special notation:

^n	represents the end of a line

^t	represents a TAB character

^^	represents the "^" character


Repeating A Replace Operation

There are two ways of repeating a text replacement operation. Because the Replace dialog remains visible until you explicitly dismiss it, you can repeat an operation - either exactly or with changes - simply by pressing one of the Find Next, Replace or Replace All buttons. You can perform the operation in any window.

However, on standard VGA screens especially, the dialog can take a large amount of space, so you may prefer to dismiss it and use the Edit Repeat Last Replace command to repeat the process. This command repeats the last replace operation you did exactly.


Text Processing

Although PFE is not intended to be used as a word processor, it does support some text processing features that are of use to those editing program source, and a few of general applicability.

Automatic Text Wrapping

Indenting And Undenting Text

Changing Case


Automatic Text Wrapping

When you're typing ordinary text, rather than a program source, it's often convenient to have the program you're using handle the business of fitting the text into the available line width.

The quickest way to activate text wrapping for a window is to double-click the left mouse button in the wrap area of the status bar. This will show the text "No Wrap" when wrapping is not active. The double click action will turn wrapping on, using the currently set wrap column, which by default is column 72.

You can also switch wrapping on and off, and also define the wrap column, for the current window, using the Options Current File/Window Modes command.

You can also cause text wrapping to be activated automatically for all files of a specific type by using the Options Default File/Window Modes command.

Whether wrapping is active, and the wrap column used, is set on a per-window basis. You can, if you want, edit the same file in two different windows with different wrap settings.

In any window for which wrapping is active, PFE monitors as you type, and whenever you type a non-space character at a screen position to the right of the defined wrap column, it will automatically break the line you're typing in at a suitable place, moving some text and the insertion point down to the next line. The line will be broken at the closest white space character or hyphen to the defined wrap column.

Note that PFE will wrap the line you're typing only when you're typing at the right hand end of it. If you move the caret to somewhere within the line and type, the line won't be wrapped even if it extends past the wrap column.

PFE does not perform any sort of text justification.


Indenting And Undenting Text

When you're editing program source, you'll very often want to change the indentation of some or all of it. PFE gives you a powerful facility to change the indentation level of either a single line, or of a larger block of text.

To indent a single line, place the caret anywhere within it and use the Edit Text Indent command. PFE will move the entire text of the line to the right by one tab stop, inserting either a single tab character or a number of spaces, as appropriate for the window. Lines that are empty are not affected.

To undent a single line, place the caret within it and use the Edit Text Undent command. PFE will move the text left by one tab stop: if the line starts with a tab character, this will be deleted; otherwise, PFE removes as many space characters as it can up to the width of a tab stop. A line that does not start with either a tab character or a space will not be altered.

If you want to indent or undent more than one line, the procedure is similar; but now you indicate the lines you want to change by selecting them. Now when you use either of the commands, PFE will alter all the lines that are selected. Unlike most operations that affect selected text, indenting and undenting operates on the whole of any line containing a highlight, and not just on the highlighted text itself.


Changing Case

PFE lets you quickly change the case of the text that you've typed. First, you should select the text whose case you want to change.

The Edit Text Uppercase Selection command will make all the characters you've selected upper case; the Edit Text Lowercase Selection command makes them all lower case.


Templates

Templates are pre-built sections of text that you can include into your files, saving you from repeatedly typing the same things.

For example, you might like to document your C procedures by preceding each one with an explanatory section like this:

/*************************************************

   start_editor
   ------------

   This procedure starts the system in edit
   mode

**************************************************/

Rather than type the lines of asterisks every time, you could set up a template containing the text:

/**************************************************

<???>
    -------------

***************************************************/

and insert it automatically in a simple operation. The "<???>" characters are a template mark to show where you have to type in extra items (such as the name of the procedure in this example). PFE lets you move between these  marks with a single keypress, so that editing is very simple and convenient.

Templates are held in template files, which you can regard as a sort of library. You can have as many template files ready for use, or attached as you want, and you can insert templates from any of them at will. Template files are not ordinary text files and can't be edited directly, but the Template menu provides you with options for creating template files, attaching and detaching them, creating, editing and deleting templates.

You can attach template files manually at any time as you need them. However, you'll probably find that you create a set of templates that you use all the time: you can arrange for PFE to attach these automatically when it starts up. You can also have a set of templates that are specific to a particular project, and this also can be attached automatically.

Creating A Template File

Attaching A Template File

Creating A Template

Inserting A Template

Editing A Template

Deleting A Template

Saving A Changed Template File

Detaching A Template File


Creating A Template File

Before you can store a template you must have a template file to place it in. The Template Create File command starts a standard dialog that lets you specify the name of the file you want to create. PFE will create the file you specified and write a small amount of binary control information into it.

You should use the file type .tpl when you create a template file. You should not try to template files directly, as they do not contain normal text.

When you create a template file it is automatically attached and ready to use.


Attaching A Template File

Before you can access any of the templates contained in a template file, you must first attach it. PFE loads the file into memory and constructs an index to the templates it contains, after which you can manipulate it.

You attach a template file with the Template Attach File command. This starts a dialog that lets you select the file you want to attach.

If you wish, you can attach a template file in read only mode. You will be able to insert templates contained in this file into files that you are editing, but you will not be able to add new templates to it or edit existing ones within it.

Having a template file attached uses some memory: PFE uses global memory to hold the data within the template file, and some control blocks. You can recover the memory used by an unwanted template file by detaching it with the Template Detach File command.

Automatically Attaching Template Files


Automatically Attaching Template Files

If you like, you can have PFE attach some template files automatically when it starts up, rather than attaching them manually one by one with the Template Attach File command. You can specify the files in two ways:

-	As it starts, PFE scans the current directory for a file called auto.tpl and attaches it if it is a valid template file

-	You can specify a  template directory in PFE's initialisation file pfe.ini (which is held in your Windows directory) with a line in the [templates] section of the form

directory=pathname

When it starts, PFE will look for a directory with the specified pathname, and will attach all the files it contains with a file type of .tpl


Creating A Template

To create a template, use the Template New command. This opens up an edit window that is exactly the same as any other; the sole difference is that the window caption will show that you're editing a template.

You can edit inside the window exactly as in any other. You have an additional facility, though: you can use the Template Insert Mark command to insert a template mark. This is a character sequence (actually the characters <???>) that are automatically searched for by the Template Find Mark command. You can use template marks to hold the position for things to be filled in once you've inserted a template into your text file.

In order to use the template once you've finished editing it, you must store it in a template file. You can create a template at any time, but to store it you must have a template file attached. Template Store As command starts a dialog that shows you all the template files that you've attached. You should select the file you want to store the template in, then type the template's name. This can be any sequence of up to 16 characters, used to identify this particular template.

PFE will write the template information into its memory copy of the template file, and you can then insert the template into files at will. However, the template will not be saved to disk until you use the Template Save File command.


Inserting A Template

At any time when you're editing, you can insert a template from any attached template file at the position of the caret.

The Template Insert command shows you a dialog that gives you a list of all the attached template files. When you select one of the files you'll see a list of all the templates that it contains; you can then select the particular template that you want to insert.

PFE will read the template data from the template file and insert it into the current window at the position of the caret. Unlike the case when you're inserting another file or pasting from the clipboard, the caret remains at the start of the inserted data. This allows you to use the Template Find Mark command to move automatically to any template marks that you've put in the template to show where extra text needs to be inserted.


Editing A Template

In order to change a template that you've stored in a template file you need first to attach the file, then use the Template Edit command. Since template files do not contain plain text, you shouldn't attempt the edit them directly.

The command shows you a dialog that lists all the attached template files. Selecting one of the files shows you a list of all the templates it contains, and then you can select the template you want to edit.

When you've selected a template, PFE will place it in an edit window for you. The window is exactly the same as one for editing a normal text file, but the caption will show you that it's actually a template you're editing. You can edit the template in any way you like.

Once you've finished your edit, you can update the template file with the Template Store command. This will delete the old version of the template from the template file and replace it with the new one. If you want to save the contents of the edit window as a template with a different name, or into a different template file, use the Template Store As command.

A template file is not updated on disk when you finish editing a template. To preserve your changes you need to explicitly save it using the Template Save File command.

Because a template is not regarded as an ordinary file, you can't use the File Save or File Save As commands. If you need to save the template into an ordinary file, use the Edit Copy command to copy the data to the clipboard and paste it into a new window.

When you're editing a template, you can use the Template Insert Mark command to insert a template mark. This is a character sequence (actually the characters <???>) that are automatically searched for by the Template Find Mark command. You can use template marks to hold the position for things to be filled in once you've inserted a template into your text file.


Deleting A Template

To delete an unwanted template from a template file, you must first attach it, then use the Template Delete command.

This starts a dialog that allows you to specify one or more templates in a template file and delete them. The template file is not updated on disk when you delete a template: to preserve your changes you need to explicitly save the file using the Template Save File command.


Saving A Changed Template File

When you edit a template, create a new one, or delete one, PFE makes the changes only to the copy of the template data that it keeps in memory. The template file on disk is not altered in any way.

To make your changes permanent, you need to use the Template Save File command This starts a dialog that shows you the names of all the template files that have been altered, allowing you to select those you want to write back to your disk.


Detaching A Template File

If you don't want to use the templates contained in a template file any more, you can regain some memory by removing the in-memory copy of the file with the Template Detach File command.

The command will start a dialog that lets you choose the template files to detach. Once you've detached a file, you won't be able to use the templates it contains until you attach it again.

PFE will not let you detach a template file if you're currently editing any of the templates it contains.


File And Window Modes

PFE allows you to change several aspects of how it operates in any particular window, by setting various modes.

File Modes apply to files. If you're editing a file in more than one window, each will use the same file modes; for example, if a file has the mode "save in Unix format" set, then PFE will save it in Unix format, whichever window is active when you do the save.

Window Modes, in contrast, apply to individual windows, and you can have different modes set for each of the windows showing a file if you choose. Window Modes tell PFE things about how to present the text to you - they dictate how wide a tab stop should be, whether text is automatically wrapped at a right margin, whether line numbers are shown, and so on.

You can alter the Window Modes applying to a single window, or the File Modes applying to a file shown in a window, at any time. A dialog lets you set all the modes in one go; and in addition, there are shortcut ways of setting some very common ones.

You can also define sets of File Modes and Window Modes that PFE should automatically apply when it opens files. For example, you can arrange that PFE will edit all files with type ".c" and ".h" with a tab size of 4, while all files of type ".txt" are to be edited with a tab size of 8 and automatic text wrapping at column 72.

Setting Modes For A Window Or File

Setting Default File and Window Modes


Setting Modes For A Window Or File

If you want to change the Window Modes for the current window, or the File Modes for the file that's being shown in it, use the Options Current Window/File Modes  command, which starts a dialog that lets you alter all the settings.

The dialog box reminds you of the name of the current file at the top. You should set the modes that you want by checking or unchecking the boxes, then press OK to action them.


Setting Default File And Window Modes

If you want, you can associate sets of File Modes and Window Modes with specific file types, so that when you open a file with a given type, or change a file's name to have a different type, it will automatically set the modes you've defined.

To define sets of modes, use the Options Default File/Window Modes command. This starts a dialog that lets you set up the information.

You can set the file and window modes that PFE is to apply

-	When it creates a new file with the File New command

-	When you use the File Open or  File View commands to open an existing file of a given type, or change the name of the file associated with a window to one with a given type

-	When you use the File Open or  File View commands to open an existing file of any other type, or change the name of the file associated with a window to one with any other type


Moving To Specific Lines

You have several ways of moving to a specific line in a file. You can use the normal movement keys and watch the file position in the status bar at the bottom of the main window, or you can turn on file line numbers and use those to guide you.

Alternatively, you can use the Edit Goto Line menu command. This starts a dialog that lets you enter the line number directly, and will adjust the window so that the caret is on the first character of the specified line.


Window Manipulation

PFE uses the standard Windows Multiple Document Interface to allow you to edit as many files as you wish simultaneously. You can use all the normal MDI techniques to manipulate the windows, and there are some further facilities specific to PFE.

Selecting A Window

Moving And Sizing A Window

Duplicating A Window

Closing A window

Widening A Window

Tiling Windows


Selecting A Window

You have several ways of moving from one edit window to another.

The Window Next command moves you between windows that are not currently icons - any iconic windows are not restored by this.

With a mouse, you can click on any window to activate it. To prevent you accidentally moving the caret when you activate a window with the mouse cursor within the edit area, PFE will not change the caret position until you click a second time.

The Window menu contains one item for each of the first 9 edit windows; clicking the item that identifies the window will activate it (if the window is an icon, it will be restored). If you have more than 9 windows open, you'll see a More Windows item, which will run a dialog that will list all the existing windows.


Closing A Window

To close a window, you can use select the Close item from its system menu, double-click in the system menu box, or use the Window Close command.

If the window is the only one currently showing a file, PFE will act as if you'd used the File Close command and close the file also; if you have made any changes to the file you'll be prompted to see if you want to save them, discard them, or cancel the operation.


Moving And Sizing A Window

You can iconize any edit window by clicking on its minimize box, or via its system menu. You can also iconize all the edit windows that exist in one operation with the Window Iconize All command.

You can maximize a window so that it fills the full extent of the main window by clicking its maximize box, or via its system menu. You can also double-click anywhere on the window's caption bar to do this.

You can move a window around or resize it with the mouse, or via the window's system menu.


Duplicating A Window

PFE allows you to have as many windows as you want showing the same file - for example, you might find it convenient to have one window showing the start of a file, and another showing the end of it. You can also apply different window modes to the windows for various effects.

The Window Duplicate command will make an exact duplicate of the current window. PFE will create a second window that is the same size as the original, with all the same window modes, showing the same text.

You can edit the file concerned in any of the windows that are showing it, but there will be a small performance penalty, as PFE needs to synchronise a change made in one window with all the others.

Although you can select text freely when you have multiple windows on a file, only one of the windows can have an active selection at any time. If you select some text and then activate another window on the same file, the selection will be cleared.


Widening A Window

Often you may want to make a window as wide as possible, so that you can see the maximum possible amount of text in each file line. You can achieve this in the normal way that Windows allows you to resize a window; but an easier way is to use the Window Widen command.

PFE will automatically make the current window as wide as possible, moving it to the far left of the main window. The window's depth and vertical position are not affected.


Tiling Windows

PFE allows you automatically to position the windows you're working with to make best use of the available screen area. You can tile windows either vertically or horizontally.

Horizontal Tiling

The Window Tile Horizontal command arranges your windows in columns, so that you can see as many lines in each as possible.

Vertical Tiling

The Window Tile Vertical command arranges your windows one above the other on the screen, so that you can see as much of each line in as many windows as possible. Depending on the size of your display, only 2 or 3 windows can be arranged in this way without becoming too small to use; excess windows are tiled in a horizontal pattern in the lower part of the screen,

In each of the tiling cases, PFE will arrange any window icons neatly towards the bottom of the screen, and will always keep the bottom row of icons visible. When tiling vertically this can reduce the usable size of the screen by too much, especially if you have more than three non-iconic windows.

You can tell PFE to use the full depth of the screen for vertical tiling by including the line

max-vertical-tile=1

in the [options] section of the initialisation file pfe.ini in your Windows directory.


Screen Fonts

By default, PFE will use the fixed pitch System font to display text in edit windows. However, it will allow you to use any fixed pitch font that exists on your system, as well as the standard ANSI and OEM fonts.

Clicking on the Options Screen Font menu command will show you a popup menu containing some screen-font related items.

To use one of the standard system fonts, click on one of the System, ANSI or OEM items. These will select the appropriate standard font.

To use a TrueType font, or one provided by some other system such as Adobe Type Manager, click on the Other item to start a standard dialog that will let you select from all the fixed-pitch fonts installed on your system

Selecting a screen font has no effect on any fonts you may have selected for printers.


The Status Bar

PFE normally shows you a status bar at the bottom of its window. This gives you several items of useful information, and also gives you a quick way of changing some settings and executing a few commands.

The status bar shows you:

-	The line number and column number where the caret is. Double clicking the left mouse button in this area executes an Edit Goto Line command.

-	The total number of lines in the file.

-	Whether the file has changed : you will see a # if it has.

-	Whether the file is read only : the characters RO will show if it is, and WR will show if you can alter it. Double clicking the left mouse button in this area will change between the two settings.

-	The command sequence prefix key - that is, whether you've typed one of ESC, Ctrl+B, Ctrl+F, Ctrl+K or Ctrl+X and PFE is waiting for you to supply the second key of the sequence.

-	Whether your keystrokes and menu selections are being recorded in a keyboard macro. Double clicking the left mouse button in this area will turn recording on and off.

-	Whether PFE will automatically wrap lines that you type, and the column number past which this wrapping will take place. Double clicking the left mouse button in this area will turn wrapping on and off.

- 	Whether the file will be saved in DOS format or Unix format. Double clicking the left mouse button in this area will change between the two formats. You cannot change the save format of a file that is marked as read only.

-	Whether typing is to be inserted into what's there already, or will overwrite it : you see INS or OVR respectively. Double clicking the left mouse button in this area will change between the two settings, as will pressing the Ins key.

-	The state of the Num Lock and Shift Lock keys

You can turn off the status bar and make a little more room for showing the files you're editing, or turn it on again, with the Options Status Bar command. On slower machines you will probably see a noticeable performance increase when you have the status bar turned off.


 The Tool Bar

Besides controlling PFE from the keyboard, or by using the menu, you can also use the tool bar to make access to the most common operations simple.

The tool bar is a collection of coloured push buttons. By default it appears at the top of the screen below the menu, but you can place it at any of the main window's edges, or have it floating as a separate window.

You can invoke the function associated with a tool bar button by clicking the left mouse button when the mouse pointer is within it. Some buttons have more than one function, and you invoke these by holding either the Shift key, the Ctrl key, or both, down as you release the mouse button.

The list below shows you the buttons and their functions. Each button is drawn as it appears on a VGA screen with a 1024 x 768 resolution; some will look slightly different on other screens.

Executes a File New command to create new, empty file edit window. With Shift it executes a Template New command to create a new, empty template window.

Executes a File Open command to open an existing file for editing. With Shift it executes a File View command to open an existing file in read-only mode, and with Ctrl it executes a Template Edit command to edit an existing template.

If the current window contains an ordinary file, this button executes a File Save command to write it to disk. If the window contains a template, a Template Store command is executed to update the in-memory copy of the template file.

Cuts the selection to the clipboard with an Edit Cut command.

Copies the selection to the clipboard with an Edit Copy command.

Pastes the clipboard contents into the current window with an Edit Paste command.

Executes an Edit Find command to search for a string. With the Shift key, it executes an Edit Repeat Find command to repeat the previous search action.

Executes an Edit Replace command to replace one string with another.  With Shift it executes an Edit Repeat Replace command to repeat the previous replace action.

This button currently has no function

Executes a Template Insert command to insert a template into the current window

If you're not currently recording a keyboard macro, this button executes an Execute Start Keyboard Recorder  command to start recording. If you are recording a macro, it executes an Execute Stop Keyboard Recorder command to stop recording. With Shift, it executes an Execute Replay Keyboard Record  command to replay any macro you have recorded previously.

Executes an Execute DOS Prompt command to start a task running the DOS command processor.

Executes an Execute DOS Command To Window command to run a DOS application, capturing output in a window. With Shift, it executes an Execute Repeat DOS Command To Window  command to repeat the last DOS command run in this way.

Executes an Execute Launch Application command to start a Windows or DOS application as an independent task. With Shift it  executes an Execute Launch Windows Tool command to run a previously-configured Windows tool, and with Ctrl it executes an Execute Configure Windows Tools command to configure the list of windows tools.

This button turns line numbering on or off in the current window

Executes a File Print command to print the current file. With Shift it executes a File Print Setup command to configure the printer you are using.

When you click the left mouse button on a toolbar button, PFE will show some text explaining its use in the status bar at the bottom of the screen. If you decide you don't want to perform the function, move the mouse pointer out of the tool bar area before releasing the mouse button.

Not all of the tool bar buttons will be usable at all times: for example, the Print button can't work if you don't actually have a file open. The buttons that you can use will display icons in colour; those that aren't currently available will show grey shadow images.

Setting The Tool Bar Size


Setting The Tool Bar Size

Normally, PFE selects the bitmaps it draws for the tool bar buttons to match the resolution of your screen, so that the tool bar appears approximately the same physical size on all screens. However, if you have a large screen with a high resolution, you may want to force PFE to use a smaller toolbar for a better appearance.

You can override the automatic sizing of the tool bar by setting the toolbar-size value in the [options] section of the initialisation file pfe.ini, which is held in your Windows directory. The option allows you to force PFE to use a small, medium or large set of tool bar buttons.


Moving The Tool Bar

By default, the tool bar appears as a row of button at the top of the screen below the menu. You can choose to place it at any of the main window's edges, or you can have it appear as a small floating window that you can place anywhere at all in the edit window. You can also, of course, choose to turn it off completely.

One way of moving the tool bar is to use the menu. The Options Tool Bar command gives you a list of possible options. You can hide the tool bar or show it, or specify where you want it to be placed.

If you have a mouse, you can also drag the tool bar to where you want it. You need to do this to start:

-	If the tool bar is at one of the window edges, place the mouse pointer within it but not over one of the buttons. The cursor will change to the shape of a hand. Press the left mouse button and hold it down. The cursor shape now changes to a four-pointed arrow.

-	If the tool bar is a floating window, put the mouse pointer over the caption bar at the top, press the left button and hold it down.

Now drag the tool bar to where you want it to be placed and release the left mouse button. If the mouse pointer is close to one of the main window's edges, the tool bar will be placed on that edge; if the mouse pointer is nearer the middle of the main window, the tool bar will turn into a floating window.

PFE will remember where you've placed the tool bar, and will put it there the next time you start the program.


Key Mapping

PFE allows you to change the details of what keys you press to perform most of its operations. For instance, you could set the Ctrl+A key so that pressing it executed the Template Attach File command if you found that convenient.

The operations that PFE performs are called functions, and these have fairly descriptive names such as FileOpen and EditTransposeCharacters. Most of the functions are similar in name to the commands used to control PFE over a DDE link, and to those on the menus.

The relationship between a key on the keyboard and the function that is performed by pressing it is known as a key mapping. You can have as many keys as you want mapped to a function.

You can store your personalised key mappings so that they are automatically applied every time you start PFE. You can also save them in key mapping files, so that different people using your system could load their own mappings; or so that you could have different mappings for different purposes

What Keys Can Be Mapped

Changing The Key Mappings

Loading Different Key Mappings

The Default Key Mappings

Dictionary Of Functions


What Keys Can Be Mapped

PFE is controlled from the keyboard using two different types of key sequences. You can't choose arbitrary keys, but the available collection is very large (some 400 keys), so you should be able to find combinations that suit your way of working.

Firstly, it uses single-character key presses such as Ctrl+A and F7, in a similar way to a standard Windows application. If you wished, you could set up PFE to operate entirely with such characters.

The second mode uses two-characters sequences, where you first press a prefix key, and then press a second key. This form provides a very large number of available keys for you to choose from, and is similar in approach to the MicroEMACS DOS-mode editor. By default prefix keys are not used, but you can choose from one or more of ESC, Ctrl+B, Ctrl+F, Ctrl+K and Ctrl+X; and you can follow each of these with a wide range of other keys.

When you run the dialog that lets you change the key mappings, you'll see a list of all the keys and key sequences that you can choose from, and select which, if any, prefix keys you want to use.

PFE does not allow you to select keys that have standard functions within Windows. Thus, you can't map any key that is pressed with Alt, since this is the standard way of selecting menu items from the keyboard. Nor can you map, for example, the F10 key, since this is the standard way of accessing the system menu of an MDI child window.


Changing Key Mappings

To change the mappings of keys to functions to be as you want, use the Options Key Mapping menu command. This starts a dialog from which you can choose your requirements.

Mapping A Key To A Function

Unmapping A Key From A Function

Mapping A Key To A Different Function

Changing The Active Prefix Keys

Saving A Key Mapping

Loading A Key Mapping


Mapping A Key To A Function

To map a key that is currently unmapped to a function, select the Options Key Mapping command, which starts the key mapping dialog.


Mapping A Key To A Different Function

To change the function the is mapped to a particular key to another one, select the Options Key Mapping command, which starts the key mapping dialog.


Unmapping A Key From A Function

To unmap a key from a function, so that it now has no action, select the Options Key Mapping command, which starts the key mapping dialog.


Saving A Key Mapping

While you are running the key mapping dialog, you can choose to save your new mapping at any time.

If you used the "/k" command line option to load a specific key map file on start-up, you will need always to use Save As button and name the file you want to save the changes to explicitly.

If you didn't use the "/k" option, you'll still be able to use the Save As button to write your changes to a specific file. However, you'll also be able to use the Save button to save the changes to the pfe.key file in your Windows directory, which PFE will by default load when it starts up.


Loading A Key Mapping

PFE allows you to save as many different sets of key mappings as you wish, so that different people using your system can each have their own favourite settings; or you can have different sets of your own for different purposes.

Key mappings are stored in files with type ".key". When it starts up, PFE will automatically try to load the key mappings from pfe.key in your Windows directory unless you suppress this on the command line as described below.

FROM THE COMMAND LINE

To load a set of key mappings other than the default when PFE starts, you can use the "/k" command line option to name any key map file. For example, starting PFE with a command line

pfe /k c:\keymaps\uemap.key

would load the key mappings in the file c:\keymaps\uemap.key. If you have a key map file pfe.key, but want to use the built-in key mappings described in this help file instead, use the "/k" option and give the filename as the single character "-" (minus).

Note that when you use the "/k" option, PFE will not save changed mappings to the file you specify, or to pfe.key, by default. When saving you will need always to give an explicit file name.

FROM THE KEY MAPPING DIALOG

To load a set of key mappings from another file when PFE is running, select the Options Key Mapping command, which starts the key mapping dialog. Clicking the Load button will cause PFE to ask you the name of the file of mappings that you want to load.


Changing The Active Prefix Keys

By default, no prefix keys will be active when you start PFE. This means that all the control keys are available to be mapped to functions, and you will not be able to use any two-character combinations to perform actions.

To activate or de-activate prefix keys, select the Options Key Mapping command, which starts the key mapping dialog, and click the Prefix Keys button.

This starts a sub-dialog that lets you set the state of the five prefix keys ESCAPE, Ctrl+B, Ctrl+F, Ctrl+K and Ctrl+X. To activate one of them, simply check the box next to its name.

If you have de-activated one or more previously active keys, PFE will not show any mappings that you may have set up using those keys. However, the mappings are remembered, and will be usable again if you re-activate the keys.


Keyboard Macros

PFE is able to record key strokes and menu selections in a keyboard macro, which you can replay as many times as you wish to make repetitive operations easier.

The Execute Start Keyboard Recorder command will start the recorder. PFE will record anything you type into an edit window, and any menu items that you select into the keyboard macro buffer; recording will continue until you use the Execute Stop Keyboard Recorder command.

Once you've recorded a keyboard macro, you can replay it with the Execute Replay Keyboard Record command. PFE will re-issue all the keystrokes and menu selections that have been recorded, just as if you were performing them yourself.

It's up to you to ensure that it's sensible to replay a keyboard macro. For example, if you don't have a file open, it's not possible for PFE to insert any characters. So that you don't accidentally ask PFE to perform some impossible operation, replay of the keyboard macro will be automatically halted if any command or keystroke fails. This can be very useful if you're performing searches: macro replay will stop if the target string is not found.

Although it records menu selections made by both keyboard and mouse, PFE does not record other mouse operations. You should, therefore, take care to use only the keyboard equivalents of mouse operations when you're recording a macro.

PFE also does not record what you type into dialog boxes. Thus, if you record an F2 key for a search, you'll see the dialog box every time you replay the key, and will have to fill in the details again. In many cases, this is how you would want the editor to operate, but sometimes you actually want to repeat a search operation exactly every time. To achieve this, you can type F2 to perform a search before you start recording; then, within the macro you can use the Shift+F2 key to repeat the search exactly without using the dialog box.

PFE provides only one keyboard macro; starting a recording will automatically delete any previous macro. In a future release you'll be able to select from multiple keyboard macros, and to record them to files for use in subsequent edit sessions.


Ending a PFE Session

You can end your PFE session by selecting the Close item in the system menu, by double clicking in the system menu box, or by using the File Exit command.

Before closing, PFE will check whether you have made any edit changes that have not yet been saved to disk. If you have, it will prompt you for each unsaved file in turn, asking you if you want to save the changes or to discard them, You also have the option of cancelling the process and remaining in PFE.


Exiting Windows

When you're developing programs that may not behave well and cause damage to the system, you'll often find it necessary to exit Windows and restart it, and maybe even to reboot your machine. PFE provides you an option on its system menu to close Windows in a variety of ways very quickly and simply.

The facilities provided by this option vary, depending on whether you're using Windows 3 or Windows/NT.

Exiting Windows 3

Exiting Windows/NT


Exiting Windows 3

To exit from your Windows 3 system, click on the system menu box at the top left corner of the main window and select the Exit Windows item. This starts a dialog that lets you perform on of the following actions:

-	Exit from Windows 3 and return to your DOS prompt

-	Exit from Windows, 3 and then restart it automatically

-	Exit from Windows 3 and then perform a warm reboot of your system

-	Exit from Windows 3, run a single DOS command automatically, then restart Windows automatically


Exiting Windows/NT

To exit from your Windows/NT system, click on the system menu box at the top left corner of the main window and select the Exit Windows item. This starts a dialog that lets you perform on of the following actions:

-	Shutown all the applications that you have started and log off from the system

-	Shutdown all applications in the system, and close down Windows/NT. You will be notified when it is safe to power your computer off

-	Shutdown all applications in the system, close down Windows/NT, and automatically reboot it


Running DOS Commands

PFE gives you two ways of interacting with DOS applications.

-	You can start one or more DOS sessions running your command processor, within which you can run any DOS program. These sessions run independently of PFE; if you want to edit the output of any program you run in one, you'll need to use the clipboard to paste it into an edit window

-	You can start a DOS application, such as a compiler, and arrange for PFE to capture its output as it runs. When the command completes, you'll see the results in an edit window. You can run external commands, or those internal to your command processor, in this way.

Starting A DOS Prompt

Running A Command And Capturing Output


Starting A DOS Prompt

The Execute DOS Prompt command starts up a DOS session, in which you can issue any DOS commands you wish. Normally PFE will start up the DOS command interpreter defined in the COMSPEC environment variable; if this is not defined, it will start command.com (for the Windows/16 version) or cmd.exe (for the Windows/NT version)

The starting directory for the DOS session will be PFE's own current directory. This can be changed through the standard file opening dialogs run by items in the File menu.

You can start as many DOS sessions as you wish, and you can continue to use PFE while a session is running.

DOS sessions started in this way run independently of PFE. If you wish to edit anything that appears in their windows, use the standard clipboard mechanisms to paste it into PFE.


Running A Command And Capturing Output

PFE allows you to issue a DOS command, such as a compiler driver, and capture the output into a new edit window for inspection.

To do this, use the Execute DOS Command To Window command. This starts a dialog that lets you specify various things about the command you want to run

The dialog allows you to set:

-	The command line to be executed. This can be any legal DOS command, including built-in commands such as dir. If you are using the 4DOS command processor, you can also use aliases and command sequences separated by the current delimiter character.

-	The working directory to be used. PFE will make this the current directory for the command process before the command is issued (PFE's own current directory setting is not affected)

-	Whether PFE is to minimize itself into an icon once the command has been issued

-	Whether PFE is to sound a beep once the DOS command has completed.

-	Whether PFE is automatically to save any altered files before running the command

-	Whether PFE is to show the output in any previously used command output window, or to create a new one

-	Whether the output window is to scroll automatically to show you the end of the output, or is to show you the beginning

The values you set in the dialog box are remembered throughout the editing session, enabling you quickly to re-issue the same command with the minimum of effort.

You can run only one DOS command at a time in this way.

In order to run a DOS command, PFE requires you to have a helper module in the same directory as the main executable. The helper module is responsible for actually running the DOS command and redirecting its output.

Under Windows/NT, the helper module is $pfeds32.exe. Under Windows/16, the module is called $pfedos.exe, and has an associated PIF file $pfedos.pif. As supplied, this PIF file runs the command in full-screen and exclusive modes; if you are working in 386 enhanced mode, you may wish to use the PIF editor to modify this.

This functionality is not available if you are running the Windows/16 version of PFE in the Win16 subsystem of Windows/NT.


Launching Windows Applications

The Execute Launch Application command gives you a convenient way of starting another Windows or DOS application running. If you're developing a program, you'll find it a useful for starting up the latest version quickly.

Applications started in this way run independently of PFE. To run a DOS application such as a compiler, and see its output in an edit window, see the section on Running A Command And Capturing Output.

The command starts a dialog that lets you specify various things about the application you want to run. You can set:

-	The command line to be executed.

-	The working directory to be used. PFE will make this the current directory for the command process before the command is issued (PFE's own current directory setting is not affected)

-	Whether PFE is to minimize itself into an icon once the command has been issued

-	Whether PFE is automatically to save any altered files before starting the task

The values you set in the dialog box are remembered throughout the editing session, enabling you quickly to start the same application again with the minimum of effort.

If you check the Save Changed Files box, PFE will check whether any of the files that you are editing have been altered, and will ask you if you want to save them. You should take care if you reply Yes to the question, as all the files that have been altered will be saved. Note that windows holding un-named files are not checked for changes.

You can launch as many independent applications as you wish.


Windows Tools

PFE allows you easily to launch Windows tools, such as the Dialog Editor, the Image Editor, and the CodeView debugger, by name from a list that you can configure.

When you add a Windows tool to the list you assign it a tool name, which can be any string up to 32 characters long. You associate with this name the command string you want to execute and the initial directory; then, when you want to start the tool, simply pick the name from the list.

You can have as many tool names referring to an application as you want: you could thus have a set that each invoke an application with slightly different command-line arguments.

Adding A Windows Tool Entry

Changing A Windows Tool Entry

Deleting A Windows Tool Entry

Launching A Windows Tool


Adding A Windows Tool Entry

To add an entry to the list of Windows Tools, you need to use the Execute Configure Windows Tools command. This starts a dialog that lets you manipulate the list of tools.

For each tool name, you can specify:

-	The command line to be executed

-	Whether PFE is to make itself into an icon before launching the tool

-	Whether is PFE is automatically to save any changed files before launching the application

The Execute Configure Windows Tools Dialog


Changing A Windows Tool Entry

To change an entry in the list of Windows Tools, you need to use the Execute Configure Windows Tools command. This starts a dialog that lets you manipulate the list of tools.

For each tool name, you can specify:

-	The command line to be executed

-	Whether PFE is to make itself into an icon before launching the tool

-	Whether is PFE is automatically to save any changed files before launching the application


Deleting A Windows Tool Entry

To delete an entry from the list of Windows Tools, you need to use the Execute Configure Windows Tools command. This starts a dialog that lets you manipulate the list of tools.


Launching A Windows Tool

To launch a tool that you've defined in the list of Windows tools, use the Execute Launch Windows Tool command. This starts a dialog that lets you select one of the tools you've configured.

You can launch the tool with the details you set when you configured it with the Execute Configure Windows Tool command, or you can change any details you wish.

PFE records the details that you set, and uses these as the default when you launch this tool again; however, you can return to the configured settings with a single button click.

The application that you launch runs independently of PFE.


Controlling PFE Over A DDE Link

Unless you started it with the command line option "/m", or had the run-modes value in the [options] section of the initialisation file set to 1, PFE will act by default as a DDE Server, allowing you to control its actions from some other program. This program will need to have the ability to act as a DDE Client; many standard applications already support this.

If you are using an existing Windows application as a DDE client you will need to consult its documentation for how to perform the necessary operations. You can easily write your own client application in Visual Basic (the DDETester application supplied with PFE demonstrates many of the techniques you will need); or you can write at API level using the Microsoft DDEML support library described in the SDK documentation and third party books.

Depending on how many DDE commands your application needs to send to PFE, and how frequently, it may be adequate for it to operate by establishing a DDE connection, issuing the command, and then closing the connection.

If, though, the application is going to make heavy use of DDE, it will be more efficient for it to establish a conversation once and leave it established until it has finished. If PFE detects that there are DDE conversations in progress when the user tries to exit from it, it will show a dialog warning that a client application is still operating, and asking whether the user wishes to abandon the closedown.

Starting And Stopping A DDE Server

Issuing Commands Over A DDE Link

Requesting Data Over A DDE Link

Pasting Data Over A DDE Link

Opening Files Over a DDE Link

In this beta release of PFE, the DDE interfaces are still under development, and there may be considerable changes from what is described here in the final released version.


Starting And Stopping A DDE Server

Normally, when you start PFE, it will run as a DDE server automatically. However, if you start PFE running in multiple-instance mode, either with the "/m" command line option, or by having set the run-modes value to 1 in the [options] section of the initialisation file, it will not automatically act as a server.

If you do want an instance of PFE that you started in this way to act as a DDE server, you can use the Options DDE Server command to activate server mode. You can also use this command to turn the server off; the menu item will have a check mark beside it when the server is running.

Normally, you should try to ensure that only one instance of PFE is running as a DDE server at any time. Although it is permissible to run multiple servers, you can't then predict which server an application will connect to at any time. There is thus the real chance that an application may send DDE commands to the wrong PFE instance.


Issuing Commands Over A DDE Link

DDE commands are sent to PFE using the standard DDE methods. Your application should open a DDE link to PFE specifying the relevant DDE service name, and a topic name of either "Editor" or "System". From Visual Basic for example, you would perform a Link.Execute operation. The DDE item name is not used.

Once the link is established, you can send one or more command strings to be executed. The command string should have the general form

[CommandName(argument,...)]

where the arguments you supply within the parentheses will vary depending on the command. The command name can be written in any mixture of upper- and lower-case letters. A maximum of 128 bytes can be sent in any transaction.

PFE will return a response of DDE_FACK immediately if the command syntax is ostensibly correct, or DDE_FNOTPROCESSED if there is some obvious error. The command itself is executed asynchronously to the DDE client, which will regain control immediately after sending it. If the last DDE command resulted in a lengthy action - such as loading a large file, or asking the user for input in a dialog box - the server may not be able to accept a new command immediately. In this case it will return a reply DDE_FBUSY to the client, which should wait for a suitable interval before attempting the command again.

To determine whether any DDE link command worked or not you need to request the data for the item "Result" from the "Editor" topic. This data item will contain the string "OK" if the command succeeded, "Error" if it failed, and "Busy" if the server has not yet completed its processing.

List Of DDE Commands


Requesting Data Over A DDE Link

The PFE DDE server allows you to request items of data from your application. For example, you can ask PFE whether the DDE server is busy, or what the result of the last DDE command was; you can also find out about the state of files that are being edited and so on.

To request data, you need to open a DDE link to the relevant DDE service name with an appropriate topic. The link item is the name of the information that you require. From Visual Basic, for example, you would perform a Link.Request operation. The reply will always be a string of characters: numbers are converted into ASCII digits.

List Of DDE Data Items


Pasting Data Over A DDE Link

PFE gives you several ways of pasting data into the current file over a DDE link.

Using the EditInsert() command

For small amounts of data, you can send the DDE command EditInsert(), giving the string to be pasted as the argument. This will often be the most convenient technique to use.

Using the clipboard

With this method, you should first place the data to be pasted into the Windows clipboard in CF_TEXT format, with the end of each line marked by a CR-LF bytes pair and a null byte marking the end of data.

Then,  you should issue the DDE command EditPaste().

The command will run asynchronously to the client application. To determine whether it succeeded or failed, you will need to request the data item "Result" from the "Editor" topic.

Using DDE Poke

With this method, you initiate a conversation with the PFE DDE server using the relevant DDE service name, the topic "Editor" and item "Paste".

Your application should first place the data to be pasted into a shareable global memory segment in CF_TEXT clipboard format, where each line is ended by a CR-LF byte pair, and a final null byte marks the end of the data.

It should then perform a DDE Poke operation passing the handle to the memory segment. From Visual Basic, for example, you would execute a Link.Poke command.

PFE will reply DDE_FACK if the command was accepted, DDE_FNOTPROCESSED if there was an error, and DDE_FBUSY if the server was busy and could not accept the command.

Under Windows 3, you may not paste more than 64 kilobytes of data in a single operation. Under Windows/NT there is no effective limit.

The paste operation will normally run asynchronously to the client application. To determine whether it succeeded or failed, you will need to request the data item "Result" from the "Editor" topic.


Opening Files Over A DDE Link

PFE gives you two distinct ways of opening files across a DDE link.

Using DDE Commands

The DDE commands FileOpen() and FileView() each allow you to open a single file, for editing or in read-only mode respectively. For opening small numbers of files, it will be most convenient to use this method.

The file names you give in these commands may include the normal DOS wildcard characters.

Using DDE Poke

To open a larger number of files, you can perform a DDE Poke operation, passing all the names in a single block of memory. To do this, you should

-	Create a suitably large block of shareable global memory (under Windows 3.1, this block must not exceed 64 kilobytes in size)

-	Place the name of the directory to be used by default with each file name at the start of the block, followed by a single space.

-	Place the names of all the files following this, separating the names from each other by a single space. Files that are in the default directory should be stored without a directory path.

-	Terminate the block with a single null byte.

-	Perform a DDE Poke operation using the topic "Editor" and item name "OpenFiles" to open the files for editing, or the item name "ViewFiles" to open them in read-only mode.

PFE will open each file in turn for editing. If a file name does not start with a drive specification or a "\" character, the name of the default directory specified at the start of the block will be prepended to it; otherwise, the file name will be used exactly as presented.

File names may contain the normal DOS wildcard characters.

For example, a data block that contained the string

c:\source main.c c:\windows\win.ini ..\std.h *.h

would open the files c:\source\main.c,  c:\windows\win.ini, c:\source\..\std.h and all the files matching the wildcard pattern c:\source\*.h


Reference Section

This section of the help file contains reference material on PFE.

Command Line Options

Dictionary Of Functions

Default Key Mappings

Initialisation File Format

DDE Commands And Data Items

List Of Window Modes

Language Awareness


Command Line Options

When you start PFE, you can give several options on the command line to control its actions. These options should follow the name of the PFE executable itself, and precede any file names.

RUN MODE OPTIONS

These options control PFE's run mode, or whether more than one instance of it will run at a time. You can set the default run mode by setting the run-mode value in the [options] section of the initialisation file pfe.ini in your Windows directory, but you can override that value when you start PFE with a command line option.

You can give one of the following options to control the run mode, overriding the initialisation file:

/m	If the option is given, the command will start a new instance of PFE whether any previous instance is running or not. If it is absent, PFE will attempt to pass control to any other instance that is running as a DDE server, and will start as a separate instance only if this fails.

An instance of PFE started with this option present will not act as a DDE server unless the "/d" option was also used.

/s	If this option is given, the command will look for any previously-running instance, and will activate it instead of running a new one. If you've given any files on the command line, at least one running instance must also be acting as a DDE server.

If no instance is already running, or if it can't be activated, a new instance will start.

CONFIGURATION OPTIONS

These options affect how PFE configures itself when it starts up:

/d	If this option is given, an instance of PFE started with the "/m" option will act by default as a DDE server; without it the instance will not have the server enabled when it starts.

/k pathname

This option specifies a key map file to be loaded on start-up instead of the pfe.key file in your Windows directory. Pathname can specify any valid key map file; if it is the single character "-" (minus) PFE will not load any key mapping at all, but will use the built-in default values described in this help file.

Using this option implies the "/m" option; a new instance of PFE will be started whether or not any others are running, and will not by default run as a DDE server.

Whatever value you give for pathname, using this option will disable all use of the default pfe.key file. The Save button in the key mapping dialog will not be available when you change the mapping. To save to this file,  you will need to use the Save As button and give the name explicitly.

For example, a command line

pfe data.txt results.txt

will start PFE, or activate a previously-running instance that was acting as a DDE server, and open the files data.txt and results.txt in the current directory.

The command line

pfe /m

will start a new instance of PFE, whether or not any others were also running. The DDE server will not be enabled when the instance starts.

The command line

pfe /k mapping.key

will start a new instance of PFE and load the key mappings contained in the file mapping.key in the current directory. The DDE server will not be enabled when the instance starts.


Dictionary Of Functions

PFE allows you to map keyboard keys or key sequences to the following functions, which appear in the functions list of the key mapping dialog.

Not all the functions that you can map to keys have equivalent menu commands; those that do have [*] shown following the description.

CaretDown	Moves the caret one line down

CaretDownSelect	Moves the caret one line down, extending the selection

CaretEnd	Moves the caret to the end of the current line

CaretEndSelect	Moves the caret to the end of the current line, extending the selection

CaretHome	Moves the caret to the start of the current line

CaretHomeSelect	Moves the caret to the start of the current line, extending the selection

CaretLeft	Moves the caret one character to the left

CaretLeftSelect	Moves the caret one character to the left, extending the selection

CaretLeftWord	Moves the caret one word to the left

CaretLeftWordSelect	Moves the caret one word to the left, extending the selection

CaretPageDown	Moves one page down in the current file

CaretPageUp	Moves one page up in the current file

CaretRight	Moves the caret one character to the right

CaretRightSelect	Moves the caret one character to the right, extending the selection

CaretRightWord	Moves the caret one word to the right

CaretRightWordSelect	Moves the caret one word to the right, extending the selection

CaretUp	Moves the caret one line up

CaretUpSelect	Moves the caret one line up, extending the selection

EditCancelSelection	Removes any highlight from selected text in the current window

EditCMatchBrace	When used with a window that has the C language type associated with it, moves the caret to a matching brace character

EditCopy	Copies the selected text to the clipboard [*]

EditCut	Copies the selected text to the clipboard and deletes it [*]

EditDeleteSelection	Deletes the selected text

EditDeleteBackwards	Deletes the character to the left of the caret

EditDeleteForwards	Deletes the character to the right of the caret

EditDeleteLine	Deletes the whole of the line that the caret is in [*]

EditDeleteToEndOfLine	Deletes from the position of the caret to the end of the current line [*]

EditGotoLine	Starts a dialog that prompts for the line number to go to in the current file [*]

EditGotoEnd	Moves to the end of the current file

EditGotoEndSelect	Moves to the end of the current file, extending the selection

EditGotoStart	Moves to the start of the current file

EditGotoStartSelect	Moves to the start of the current file, extending the selection

EditMarkUnchanged	Removes PFE's indication that the current file has been altered

EditNewLine	Inserts a new line character at the position of the caret

EditPaste	Pastes the contents of the clipboard into the current file at the position of the caret [*]

EditSearch	Searches for a string in the current file [*]

EditSelectWord	Selects the whole word that the caret is currently within [*]

EditShowNextLine	Scrolls the window upwards to show the next line in the file. The caret remains in the same place within the file

EditShowNextPage	Scrolls the window upwards to show the next page in the file. The caret remains in the same place within the file

EditShowPreviousLine	Scrolls the window downwards to show the previous line in the file. The caret remains in the same place within the file

EditShowPreviousPage	Scrolls the window downwards to show the previous page in the file. The caret remains in the same place within the file

EditSplitLine	Splits the current line at the position of the caret, leaving the caret unmoved

EditRepeatLastFind	Repeats the last find operation [*]

EditRepeatLastReplace	Repeats the last replace operation [*]

EditReplace	Replaces occurrences of one string with another string [*]

EditTextIndent	Indents the current line, or all the lines in a selection, by one tab stop [*]

EditTextLowercaseSelection
Converts all the letters in the current selection to lower case [*]

EditTextTransposeCharacters
Exchanges the character under the caret with the one to its left [*]

EditTextUndent	Undents the current line, or all the lines in a selection, by one tab stop [*]

EditTextUppercaseSelection
Changes all the text that is currently selected to be upper case [*]

ExecConfigureTools	Starts a dialog to configure details of program development tools [*]

ExecControlPanel	Starts the Windows Control Panel [*]

ExecDOSCommand	Runs a DOS command, capturing output in an edit window [*]

ExecDOSPrompt	Runs a DOS command-line shell [*]

ExecLaunchApp	Starts a Windows or DOS application to run independently of PFE [*]

ExecLaunchTool	Starts a program development tool [*]

ExecFileManager	Runs the Windows File Manager [*]

ExecRecordPlay	Replays the last recorded keyboard macro [*]

ExecRecordStart	Starts recording keystrokes and menu selections [*]

ExecRecordStop	Stops recording keystrokes and menu selections [*]

ExecRepeatDOSCommand 	Repeats the last DOS command run with the ExecDOSCommand function [*]

FileAbandon	Closes the file being edited in the current window, discarding any unsaved changes

FileClose	Closes the file being edited in the current window, prompting if there are unsaved changes [*]

FileCloseAll	Closes all the files being edited, prompting if any of them contain unsaved changes [*]

FileExit	Terminates the PFE editing session [*]

FileInsert	Inserts a file into the current one at the position of the caret [*]

FileMail	Mails the current file [*]

FileName	Changes the name of the file associated with the current window [*]

FileNew	Creates a new empty edit window for an unnamed file [*]

FileOpen	Opens an existing file for editing [*]

FilePrint	Prints the current file [*]

FilePrintSetup	Runs a dialog that allows printer information to be configured [*]

FileSave	Saves the current file to disk, provided that it has been altered [*]

FileSaveAs	Saves the current file to disk, allowing the output file name to be specified [*]

FileSaveAll	Saves all altered files and templates [*]

FileView	Opens an existing file in read-only mode [*]

FileWrite	Writes a file to disk whether or not it has been changed, allowing you to specify the name of the output file [*]

HelpAbout	Shows PFE's About box [*]

HelpCommands	Displays the PFE Help File at the Commands topic [*]

HelpContents	Displays the PFE Help File at the Contents topic [*]

HelpOnHelp	Starts the Windows help engine to give help about itself [*]

HelpProcedures	Displays the PFE Help File at the Procedures topic [*]

HelpReference	Displays the PFE Help File at the Reference topic [*]

HelpUserDefined1	Starts the Windows help engine, using the first help file configured in the [help-files] section of the initialisation file [*]

HelpUserDefined2	Starts the Windows help engine, using the second help file configured in the [help-files] section of the initialisation file [*]

HelpUserDefined3	Starts the Windows help engine, using the third help file configured in the [help-files] section of the initialisation file [*]

HelpUserDefined4	Starts the Windows help engine, using the fourth help file configured in the [help-files] section of the initialisation file [*]

HelpUserDefined5	Starts the Windows help engine, using the fifth help file configured in the [help-files] section of the initialisation file [*]

OptionsCurrent	Starts a dialog to change the current window and file modes [*]

OptionsDDEStart	Starts the DDE server

OptionsDDEServer	Stops the DDE server

OptionsDDEToggle	Starts the DDE server if it is not running, and stops it if it is [*]

OptionsDefault	Starts a dialog to change the window modes for specific file types [*]

OptionsKeyMappings	Starts a dialog to change the mapping of keys to functions [*]

OptionsPrefixKeys	Starts a dialog that allows the user to define what prefix keys are active

OptionsResetModes	Sets the window modes for the current window, and the file modes for the file that it is showing, to those appropriate for the file's type [*]

OptionsScreenFontAnsi	Sets the screen font to be the standard non-proportional ANSI font [*]

OptionsScreenFontOEM	Sets the screen font to be the standard OEM font [*]

OptionsScreenFontOther	Starts a dialog that allows the user to select any screen font [*]

OptionsScreenFontSystem	Sets the screen font to be the standard non-proportional system font [*]

OptionsToggleInsertMode 	Switches between insert and overwrite modes

OptionsToggleLineNumbers 	Turns line numbering on or off in the current window

OptionsToggleStatusBar	Makes the status bar visible or invisible [*]

OptionsToolbarBottom 	Positions the tool bar at the bottom of the screen [*]

OptionsToolbarFloat	Makes the tool bar into a detached floating window [*]

OptionsToolbarHide	Makes the tool bar invisible [*]

OptionsToolbarLeft 	Positions the tool bar at the left of the screen [*]

OptionsToolbarRight	Positions the tool bar at the right of the screen [*]

OptionsToolbarShow	Makes an invisible tool bar visible at its previous location [*]

OptionsToolbarTop	Positions the tool bar at the top of the screen [*]

TemplateFileAttach	Attaches a template file so the templates within it can be used [*]

TemplateFileCreate	Creates a new, empty template file [*]

TemplateFileDetach 	Detaches an attached template file [*]

TemplateFileSave	Saves an altered template file to disk [*]

TemplateDelete	Deletes a template from a template file [*]

TemplateEdit 	Edits a template from within a template file [*]

TemplateFindMark	Searches in a forward direction from the position of the caret for the next occurrence of a template marker [*]

TemplateInsert	Inserts a template from a template file into the current file at the position of the caret [*]

TemplateInsertMark	Inserts a template marker into a template [*]

TemplateNew 	Creates a new empty window suitable for editing a template [*]

TemplateStore	Stores a template in a template file [*]

TemplateStoreAs	Stores a template in a template file, allowing its name to be changed [*]

WindowArrangeIcons 	Arranges all iconized windows neatly [*]

WindowCascade	Arranges all non-iconic windows in a cascade [*]

WindowClose	Closes the current window [*]

WindowDuplicate	Makes an exact duplicate of the current window [*]

WindowIconizeAll	Makes all existing windows iconic [*]

WindowMaximize	Maximizes the current window [*]

WindowNext	Switches control to the next non-iconic window [*]

WindowRestore	Restores the current window from iconized or maximized state

WindowTileHorizontal	Arranges all non-iconic windows in a tile pattern, maximizing their depth [*]

WindowTileVertical	Arranges all non-iconic windows in a tile pattern, maximizing their width [*]

WindowWiden	Adjusts the size and position of the current window to make it as wide as possible [*]


The Default Key Mappings

As supplied, PFE contains a set of key mappings that enable you to perform the most common operations quickly. You may use these as they stand, or may modify them to suit your preferences.

By default, no prefix keys are enabled, so that only single keys are available for mapping.

Description Of Default Key Mappings

Table Of Keys And Default Functions


Description Of Default Key Mappings

This section lists the keys that have default mappings, giving you a description of the action that they carry out and the equivalent menu command (if any).

For a table that lists the keys with the names of the functions used in the key mapping dialog, see the Table Of Keys And Default Functions.

FUNCTION KEYS

F1	Opens the PFE Help File at the Contents topic

F2	Executes the Edit Find command to search for a string

Shift+F2	Executes the Edit Repeat Last Find command to repeat the last search operation

F3	Executes the Edit Replace command to replace strings

Shift+F3	Executes the Edit Repeat Last Replace command to repeat the last replace operation

F4	Executes the Template Find Mark command to search for a template mark

Shift+F4	Executes the Window Tile Horizontal command to arrange windows in a tile pattern

F5	Executes the Edit Goto Line command to prompt for a line number to move to in the current window

Shift+F5	Executes the Window Cascade command to arrange windows in a cascade pattern

Ctrl+F5	Executes the Window Centre Caret command to bring the line containing the caret to the centre of the window

F6	Executes the Template Insert Mark command to insert a template mark

F7	Executes the Execute Replay Keyboard Record command to replay a keyboard macro

Shift+F7	Executes the Execute Start Keyboard Recorder command to begin recording a keyboard macro

Ctrl+F7	Executes the Execute Stop Keyboard Recorder to stop recording a keyboard macro

F9	Executes the Template Insert command to insert a template into the current window

F11	Executes the Execute DOS Command To Window command to run a DOS command and capture its output in a window

Shift+F11	Executes the Execute Launch Application command to launch a Windows application to run independently of PFE

Ctrl+F11	Executes the Execute DOS Prompt command to start a DOS session

F12	Executes the Execute Launch Windows Tool command to launch a tool from the list of configured Windows Tools

Shift+F12	Executes the Execute Configure Windows Tools command to let you configure the list of Windows Tools

MOVEMENT KEYS

For these keys, the default mapping is such that adding Shift to the combination causes a selection to be extended

Up	Moves the caret up by one line

Shift+Up	Moves the caret up by one line, extending the selection

Down	Moves the caret down by one line

Shift+Down	Moves the caret down by one line, extending the selection

Left	Moves the caret left by one character

Shift+Left	Moves the caret left by one character, extending the selection

Ctrl+Left	Moves the caret left by one word

Shift+Ctrl+Left	Moves the caret left by one word, extending the selection

Right	Moves the caret right by one character

Shift+Right	Moves the caret right by one character, extending the selection

Ctrl+Right	Moves the caret right by one word

Shift+Ctrl+Right	Moves the caret right by one word, extending the selection

PgUp	Moves the caret up by one page

Shift+PgUp	Moves the caret up by one page, extending the selection

PgDn	Moves the caret down by one page

Shift+PgDn	Moves the caret down by one page, extending the selection

Home	Moves the caret to the start of the line

Shift+Home	Moves the caret to the start of the line, extending the selection

Ctrl+Home	Moves the caret to the start of the file

Shift+Ctrl+Home	Moves the caret to the start of the file, extending the selection

End	Moves the caret to the end of the line

Shift+End	Moves the caret to the end of the line, extending the selection

Ctrl+End	Moves the caret to the end of the file

Shift+Ctrl+End	Moves the caret to the end of the file, extending the selection

CONTROL KEYS

Ctrl+C	Executes the Edit Copy command to copy selected text to the clipboard

Ctrl+G	Executes the Edit Goto Line  command to move the caret to a specific line

Ctrl+K	Executes the Edit Delete To End Of Line command to delete everything from the caret position to the end of the line

Shift+Ctrl+K	Executes the Edit Delete Line command to delete the entire line that the caret is in

Ctrl+N	Executes the File New command to create a new, empty edit window

Ctrl+O	Executes the File Open command to open an existing file

Shift+Ctrl+O	Splits the current line at the position of the caret, leaving the caret unmoved

Ctrl+P	Executes the File Print command to print the file showing in the current window

Ctrl+S	Executes the File Save command to save the current file to disk

Ctrl+T	Executes the Edit Text Transpose Characters command to transpose the character under the caret with the one to its left

Ctrl+V	Executes the Edit Paste command to paste data from the clipboard into the current window

Ctrl+W	Executes the Window Select command to let you choose between many open windows

Ctrl+X	Executes the Edit Cut command to cut selected text to the clipboard

OTHER KEYS

Enter	Inserts a newline

BackSpace	Deletes the character to the left of the caret

Del	Deletes the character to the right of the caret

Shift+Del	Executes the Edit Cut command to cut selected text to the clipboard

Ins	Toggles the current window between Insert and Overwrite modes

Shift+Ins	Executes the Edit Paste command to paste data from the clipboard into the current window

Ctrl+Ins	Executes the Edit Copy command to copy selected text to the clipboard

Keypad 5	Cancels the current selection, removing the highlight


Table of Keys And Default Functions

These tables show you the functions that are by default mapped to certain keys. For a description of the action of each function, consult the functions dictionary

A descriptive list of the action of each key is in the Description Of Default Key Mappings section.

FUNCTION KEYS

KEY	Used Alone	With Shift	With Ctrl
F1	HelpContents
F2	EditFind	EditRepeatLastFind
F3	EditReplace	EditRepeatLastReplace
F4	TemplateFindMark	WindowTileHorizontal
F5	EditGotoLine	WindowCascade	CaretCentre
F6	TemplateInsertMark
F7	ExecRecordPlay	ExecRecordStart	ExecRecordStop
F8
F9	TemplateInsert
F11	ExecDOSCommand	ExecLaunchApp	ExecDOSPrompt
F12	ExecLaunchWindowsTool	ExecConfigureWindowsTools

MOVEMENT KEYS

For these keys, the default mapping is such that adding Shift to the combination causes a selection to be extended

KEY	Used Alone	With Shift	With Ctrl	With Ctrl+Shift
Up	CaretUp	CaretUpSelect
Down	CaretDown	CaretDownSelect
Left	CaretLeft	CaretLeftSelect	CaretLeftWord	CaretLeftWordSelect
Right	CaretRight	CaretRightSelect	CaretRightWord	CaretRightWordSelect
PgUp	CaretPageUp	CaretPageUpSelect
PgDn	CaretPageDown	CaretPageDownSelect
Home	CaretHome	CaretHomeSelect	EditGotoStart	EditGotoStartSelect
End	CaretEnd	CaretEndSelect	EditGotoEnd	EditGotoEndSelect

CONTROL KEYS

KEY	Used Alone	With Shift
Ctrl+C	EditCopy
Ctrl+G	EditGotoLine
Ctrl+K	EditDeleteToEndOfLine	EditDeleteLine
Ctrl+N	FileNew
Ctrl+O	FileOpen	EditSplitLine
Ctrl+P	FilePrint
Ctrl+S	FileSave
Ctrl+T	EditTextTransposeCharacters
Ctrl+V	EditPaste
Ctrl+W	WindowSelect
Ctrl+X	EditCut

OTHER KEYS

KEY	Used Alone	With Shift	With Ctrl	With Ctrl+Shift
Enter	EditNewline
BackSpace	EditDeleteBackwards
Del	EditDeleteForwards	EditCut
Ins	OptionsToggleInsertMode	EditPaste	EditCopy
Keypad 5	EditCancelSelection


Initialisation File Format

PFE uses an initialisation file named pfe.ini to record the values that should be carried over from one session to another; you can also place various customisation options in it.

The file is held in your Windows directory, and can be edited with PFE or any other editor. However PFE will change many parts of the file when it exits. Unless specified, you should therefore edit sections with the Windows NotePad editor for safety.

The information contained in the file is in the standard format used by all Windows applications. The file is divided into sections by lines of the form

[options]

and all lines following this up to the next section name are treated as a group.

Within each section come lines of the general form

key string=argument,argument,....

The key string is text (which may include spaces) that PFE uses to locate a particular line; the comma-separated arguments that follow the = sign provide the data relevant to the key.

At this beta release the format of sections other than those given below is not finalised; the entire file will be documented for the first main release.

The [options] Section

The [fileopen-filters] Section

The [help-files] Section


The [options] Section Of The Initialisation File

This section contains various items that allow you to customize how PFE behaves to suit your own preferences. PFE never alters the contents of this section itself.

You can safely use PFE itself to alter the contents of this section. Any changes you make will not take effect until you terminate PFE and restart it.

 The lines that you can include are as follows:

allow-save-always=number

Specifies whether PFE should always allow you to save a file, whether or not it has been changed. If number is 0, the File Save command will be enabled only after you change the file; if number is 1, the menu option and tool bar button will always be available.

The default value is 0.

auto-file-action=number

Specifies what action PFE should take on starting up if no files are named on the command line. The values permitted for number are:

0	No action

1	Simulate a FileNew command and create an empty, unnamed window

2	Simulate a FileOpen command and show the dialog that allows you to choose which files to open

The defaut value is 0.

auto-format=number

Specifies whether PFE is to attempt automatically to detect that a file being opened is in UNIX format. If number is 0, PFE does not try to determine the format; if it is 1, it examines the terminator of the first line in the file, and if it is a single Line Feed character (LF) sets the file mode Save in UNIX format for the file.

The default value is 1.

deselect-on-copy=number

If number is 0, PFE leaves the selected text highlighted after it is copied to the clipboard. If number is 1, the highlighting is removed.

The default value is 0.

dragdrop-flip=number

If number is 0, text drag-and-drop performs a move operation if no key is pressed, and a copy if the Ctrl key is down at the time of releasing the left mouse button. If number is 1 the actions are reversed, so that copy becomes the operation performed when no key is pressed.

The default value is 0.

max-vertical-tile=number

If number is 0, PFE will leave room at the bottom of the screen to show one row of icons when tiling windows vertically. If it is 1, the entire depth of the screen is covered with the tiled windows.

The default value is 0.

minimize-on-empty=number

If number is 1, the main PFE window will become an icon when the final edit window in use is closed. If it is 0, the main window's state does not change.

The default value is 0

mru-files-shown=number

This option controls the maximum number of files from the most-recently-used files list that will be shown on the File menu; number can lie in the range 0 to 8. If the list contains more files than are displayed, an additional menu item More Files (or Recent Files if the value is zero) is added to the menu to allow them to be selected from a dialog.

The default value is 5; setting larger values may make the File menu too long for convenient display on a standard VGA display.

mru-list-size=number

This option controls the maximum number of file names that PFE will record in its list of most-recently-used files. Number can lie in the range from 0 to 64; setting it to 0 causes PFE not to maintain a list.

The default value is 5.

open-maximized=number

This option controls whether file windows are created in a maximized or a restored state. The values permitted for number are:

0	Create file window in a restored state

1	Create file window maximized always

2	Create file window maximized if the current file's window is also maximized

11	Create file window maximized if PFE's main window is maximized

12	Create file window maximized if PFE's main window is maximized and the current file's window is also maximized

Windows created to receive DOS command output, and those created by Window Duplicate command,  are always created in a restored state whatever the value of this option.

The default value is 0.

run-mode=number

This options sets the default value for whether PFE will try to run as only one instance, or as multiple instances. The values permitted for number are:

0	Attempt to ensure that only one instance of PFE is running at any time

1	Always start a new instance of PFE

The default value is 0. The value set here can be overridden with the command line options /m and /s.

select-search-match=number

If number is 1, PFE will highlight a matching string at the end of a successful search operation. If it is 0, the text is not highlighted. The value may be over-ridden in the Find dialog box.

The default value is 1.

sound-beep=number

If number is 0, PFE will not generate any warning beeps when it displays message boxes indicating error conditions; if it is 1, certain messages will sound a beep to notify you.

The default value is 1. You cannot suppress the warning beeps that are the sole indication of an error (for example, when you try to insert a character in a read-only window)

start-maximized=number

If number is 1, PFE will always start with its main window maximized. If it is 0, PFE will start with the main window in a restored state, at the same size and position as it was at the end of the last session. If the option is absent, PFE will start either restored or maximized, depending on its state at the end of the last session.

toolbar-size=number

This options overrides the automatic sizing of the toolbar, which sets the buttons at a size appropriate for the screen resolution, and allows you to select the size required. The values allowed for number are

0	Size the toolbar automatically to suit the screen resolution

1	Use the small set of toolbar buttons, normally used on screens of 640x480 resolution

2	Use the medium set of toolbar buttons, normally used on screens of 800x600 resolution

3	Use the large set of toolbar buttons, normally used on screens of 1024x768 resolution

The default value is 0.

track-vertical-thumbtack=number

If number is 1, PFE will scroll the text in a window to follow the vertical scrollbar thumbtack when this is dragged with the mouse. If number is 0, the window is not updated until the left mouse button is released.

The default value is 1.

use-dragdrop=number

If number is 0, PFE will not perform drag-and-drop moving and copying of text. If it is 1, drag-and-drop is available.

The default value is 1.


The [fileopen-filters] Section Of The Initialisation File

This section allows you to specify the filters that appear in the common dialogs for opening and saving files. PFE never alters the contents of this section itself.

The filters appear in the list box at the lower left of the dialogs, and control what files are shown in the main list above them. For example, if you selected a filter "*.c;*.h", only files with types ".c" and ".h" would be shown.

Within the [fileopen-filters] section each line represents one filter, and PFE inserts them into the list of filters in the order you give them. Each line has the form

text=filterlist

Where text is some descriptive text such as "Source Files" that you can choose yourself, and filterlist is a list of wildcard patterns, separated by commas.

For example, you might include the line

Source Files=*.c,*.h

to set up a filter to show only files with types of ".c" and ".h" .

PFE uses only the filters you specify, so normally you would want to include a line such as

All Files=*.*

probably as the last in the section to let you see files not covered by the other filters.

If you don't have a [fileopen-filters] section in your initialisation file, PFE uses a single filter of "*.*" to show all files.

You can safely use PFE itself to alter the contents of this section. Any changes you make will not take effect until you terminate PFE and restart it.


The [help-files] Section Of The Initialisation File

This section allows you to specify up to five items to be added to the Help menu. Each item causes PFE to invoke the Windows help engine on a specified help file.

Within the section, each entry has the format

menu_string=helpfile_path

Menu_string specifies what you want to see on the help menu for the item. If you include an "&" character in the string, the character following it will appear underlined, and will be used as the menu item's hot key.

Helpfile_path specifies the name of the Windows help file to be opened when you click the menu item. You must either give a full path name for the file, or it must be in a directory named in the PATH environment variable.

For example, a section like this:

[help-files]

Windows/NT API=c:\win32hlp\win32wh.hlp

MSC 32-bit Compiler RTL=c:\win32hlp\msc.hlp

would add two items to the Help menu.

You can safely use PFE itself to alter the contents of this section. Any changes you make will not take effect until you terminate PFE and restart it.

If you wish, you can map each of the added items to key strokes; the functions that correspond to them are HelpUserDefined1 to HelpUserDefined5.


DDE Commands And Data Items

PFE can be controlled remotely by another application using a DDE link. PFE supports the standard DDE techniques, and can be used from any compliant application.

There are two ways of communicating with PFE. The application can send it commands, which cause PFE to take some action; or it request data items, which cause PFE to return it some information.

Controlling PFE Over A DDE Link

DDE Commands

DDE Data Items

DDE Poke Items


DDE Commands

The DDE commands currently supported are listed below. For details of how to use a DDE link to control PFE, see Controlling PFE Over A DDE Link

CaretDown(count,select)
Moves the caret down by count lines. If select is 1 the characters it moves over are selected and shown in reverse video; if it is 0 they are not and any outstanding selection is cancelled.

CaretEnd(select)	Moves the caret to the end of the current line, possibly extending a selection.

CaretHome(select)	Moves the caret to the start of the current line, possibly extending a selection.

CaretLeft(count,select)
Moves the caret left by count characters, possibly extending a selection.

CaretLeftWord(count,select)
Moves the caret left by count words, possibly extending a selection.

CaretRight(count,select)
Moves the caret right by count characters, possibly extending a selection.

CaretRightWord(count,select)
Moves the caret right by count words, possibly extending a selection.

CaretUp(count,select)
Moves the caret up by count lines, possibly extending a selection.

EditCopy()	Copies the currently selected text to the clipboard.

EditCut()	Deletes the currently selected text, copying it to the clipboard.

EditDeleteBackwards(count)
Deletes the count characters to the left of the caret.

EditDeleteForwards(count)
Deletes the count characters to the right of the caret.

EditGotoEnd(select)	Moves the caret to the end of the file, possibly extending a selection.

EditGotoLine(number,select)
Moves the caret to the start of the line specified by number. If the string is preceded by either a "+" or a "-" sign, PFE will move to the start of the line that is number after or before the current line , respectively. The string "end" may be used to represent the start of the last line in the current file. If select is "1", the text from the starting position to the start of the target line will be highlighted.

EditGotoStart(select)
Moves the caret to the start of the file, possibly extending a selection.

EditFind("string",options)
Searches the current window for the specified string. Within string, special characters are represented with the same notation as used in the dialog started by the Edit Find  command.

The options parameter is a numeric value that specifies how the search operation is to be carried out, made up by summing any values from this list:

1	Search in the reverse direction

2	Search is to be case sensitive

4	Highlight the matching string

8	Highlight all text from the starting position of the caret to the end of the matching string

The Result data item will return "OK" if the search string was found, and "Error" if it was not.

EditInsert("string")
Inserts the quoted string into the current file at the position of the caret. Within the string, the characters "^n" represent a line break and "^t" a tab character. To insert a "^" character, specify it as "^^", to insert a quote character, specify it as two consecutive quote characters.

EditPaste()	Causes the contents of the Windows clipboard (provided that it is in CF_TEXT format) to be pasted into the current file at the position of the caret. You can also use a DDE Poke operation to paste data.

FileAbandon()	Closes the current file. If the file has been altered, unsaved changes will be discarded.

FileClose()	Closes the current file. If the file has been altered, the user will see a dialog box asking him if he wishes to save the data.

FileInsert("filename")	Inserts the specified file into the current file at the position of the caret. If the filename is not an absolute pathname, it is treated as being relative to PFE's current working directory. If the filename is omitted, PFE will show a dialog box to ask the user to supply it.

FileName("filename")	Changes the name of the file associated with the current window. If the filename is not an absolute pathname, it is treated as being relative to PFE's current working directory. This command will fail if the current window contains a template.

FileNew()	Creates a new window for an un-named file.

FileOpen("filename")	Opens the specified file for editing. If the filename is not an absolute pathname, it is treated as being relative to PFE's current working directory. You can open several files at once with a DDE Poke operation using the item "OpenFiles".

The filename you specify in this command may contain the normal DOS wildcard characters.

FileSave()	Writes the current file to disk, providing it has been changed since it was last saved. If the file is currently un-named, the user will see a dialog asking him for the file name it is to be saved under.

FileSaveAs("filename")	Writes the current file to disk, changing its name in the process.  If the filename is not an absolute pathname, it is treated as being relative to PFE's current working directory.

FileView("filename")	Opens the specified file in read-only mode.  If the filename is not an absolute pathname, it is treated as being relative to PFE's current working directory.

The filename you specify in this command may contain the normal DOS wildcard characters.

FileWrite("filename")	Writes the current file to disk with the specified filename, whether or not it has been changed. The name by which the file is known to PFE, as shown in the window caption, is not altered. If the filename is not an absolute pathname, it is treated as being relative to PFE's current working directory.

WindowActivate(id)	Activates the window with the specified id value. The id is a numeric string, returned by querying the data item WindowID when the desired window is current.


DDE Data Items

The supported items that you can request data from over a DDE link are listed below. For details of how to use a DDE link to control PFE, see Controlling PFE Over A DDE Link

Topic "Editor"

ColumnNumber	Gives you the number of the text column containing the caret in the current file, or "Error" if there is no file open. The leftmost column is numbered 1.

FileChanged	Tells you whether the current file has been altered since it was last saved. The reply will be the string "Yes" if the file has changed; and "No" if either the file has not changed, or there is no current file.

FileName	If the current window contains a file that has an associated file name, the reply will be that name. If there is no current window, or the window has no associated file name, it will be the string "Error".

FileWritable	Tells you whether the current file can be written or not (i.e. that read-only mode has not been set). The reply will be "Yes" or "No", or "Error" if no file is open.

LineNumber	Gives you the number of the line in the current file containing the caret, or "Error" if there is no file open. Depending on the size of the file, the number may exceed the capacity of a 16-bit integer.

Result	Gives you the result of the last command executed over the DDE link. The reply will be one of the strings "OK" or "Error" if a result is available, and "Busy" if the server is currently processing a DDE link command. The results of commands executed from the keyboard, menu or toolbar cannot be read by this method.

Status 	Gives you the current status of the DDE server. The reply will be one of the strings "Ready" and "Busy".

WindowID	Gives you the unique id number of the current window as a numeric string. This id value can be used to identify the window for the whole of its life; id values are never re-used in any given PFE session. If no window exists, the string "Error" is returned.

WindowTitle	Gives you the string that is the caption of the current window

Topic "System"

Formats 	A list of the clipboard formats supported by PFE's DDE server. This will be the string "TEXT"

SysItems	A list of items supported by PFE under the "System" topic, separated by tab characters

Topics	A list of the topics supported by PFE, separated by tab characters

Status 	The current status of the DDE server. The reply will be one of the strings "Ready" and "Busy".


DDE Poke Items

The DDE Poke items currently supported are listed below. For details of how to use a DDE link to control PFE, see Controlling PFE Over A DDE Link

All DDE Poke operations should use the relevant DDE service name and the topic "Editor". The data should be passed in a shareable global data segment.

OpenFiles	This topic allows you to open a number of files for editing in one operation. The data should contain the name of the default directory to be used for each file, separated by one space from a list of filenames, also separated by one space. A null byte should mark the end of the list.

If a file name in the list does not contain a directory path, the default directory string will be prepended to it; otherwise it is used exactly as supplied.

The file names given in the list may contain the normal DOS wildcard characters.

ViewFiles	This topic allows you to open a number of files in read-only mode in one operation. The details are as for the OpenFiles topic above.

Paste	This topic allows you to paste data into the current window at the position of the caret. The data should be in CF_TEXT clipboard format, with the end of each line marked by a CR-LF byte pair, and a final null byte terminating the block.

Under Windows 3, you may not paste more than 64 kilobytes of data in one operation.

DDE Poke operations are carried out asynchronously to the client application. To determine whether they succeeded or failed, the client must request the data from the item "Result" in the "Editor" topic.


List Of Window Modes

PFE associates a set of Window Modes with every edit window, that tell it how to present text to you. The modes can be set with the Options Current  File/Window Modes and Options Default File/Window Modes commands.

The window modes that you can set are these:

Auto Indenting	This mode is either on or off. When it is on, PFE automatically indents new lines to match the indent of the one above.

Language	This mode is a string which defines what language awareness PFE should use for the window. Currently, you can set this only to "C"

Overwrite	This mode is either on or off. When on, PFE replaces the characters under the caret by the ones you type.

Page Headers	This mode is either on or off. When printing, PFE heads each print output page with a title showing the name of the file, the date and time, and the page number if the mode is on.

Soft Tabs	This mode is either on or off. When it is off, PFE inserts a single tab character into the file when you press the TAB key. When the mode is on, PFE inserts a suitable number of spaces to bring the caret to the next tab stop, as defined by the Tab Size mode.

Show Line Numbers	This mode is either on or off. When it is on, PFE displays the number of each line in the window.

Strip Trailing Spaces	This mode is either on or off. When it is on, PFE removes any trailing space or tab characters from a line when you press Enter at the end of it.

Tab Size	This mode is a numeric value that defines the width of a tab stop on the screen.

Wrap Column	This mode is a numeric value that defines the column at which automatic text wrapping is performed. By default, the mode has the value of 72.

Wrap Enabled	This mode is either on or off. When it is on, PFE will automatically wrap the line you're typing in as you move past the column set by the Wrap Column mode.

Wrap Long Lines	This mode is either on or off. When printing a file, PFE will fold lines that do not fit the page if the mode is on, and truncate them if it is off.


Language Awareness

PFE contains some awareness of the format of programming languages, to help you when writing program sources. Currently only the C language is supported.

To select language awareness, you need to specify the language in the window modes for the window you are editing in. You can specify that any file with a given file type should use a particular language automatically, or you can change the current window's language at any time.

When editing files that have the C language mode set, PFE provides these facilities:

-	A # character typed in an otherwise empty line is always moved to column 1

-	A closing } brace typed in an otherwise empty line is moved to the same column as the immediately preceding opening brace {, providing that this is the only character in its line

-	When the caret is positioned on any of the brace characters (, ), [, ], { and }, the function EditCMatchBrace (which does not have a corresponding menu command or a default key mapping) will move it to the corresponding opening or closing brace.


The Options Default File/Window Modes Dialog

This dialog allows you to set the file and window modes that PFE is to apply when you open existing files or create new ones.

Steps

1	Specify what sort of file you're setting modes for.

To set default modes for files created with the File New command, click the New Files button

To set default modes for files of a given file type, that will be applied when you use the File Open, File View, File Save As and File Name commands, click the File Type button, and either select the file type from the adjoining list, or type a new one into the edit control. When you enter a file type, you must always type the leading "."

To set default modes for file types not in the list set above, click the Other Types button.

2	Check and uncheck the mode boxes in the rest of the dialog to specify the modes you want.

3	Click the Apply button to store the modes with the particular sort of file chosen in step 1. You can set modes for other sorts of files by returning to step 1.

4	If you want to record the mode settings permanently, click the Save button.

The modes you can set in the dialog are these:

The Display/Input Modes Area:

This area contains settings that control how the text is displayed in the window, and any special actions PFE takes as you type.

Check the Auto Indenting box to have PFE indent new lines to the same level as the preceding line

Check the Strip Trailing Spaces box to have white space removed from the end of a line whenever you press Enter

Check the Show Line Numbers box to display line numbers in the window.

Check the Overwrite box to have the characters you type overwrite those under the caret rather than being inserted in front of them.

To associate a language type with the window, select the one you require from the Language list.

The Screen Formatting Area:

This area contains settings that affect tabs and text wrapping.

The Tab Size edit control lets you define the width of a tab stop.

If you want PFE to insert spaces when you press the TAB key, check the Soft Tabs box. If the box is unchecked, PFE inserts a single TAB character.

Check the Wrap Enabled box to activate text wrapping. With this turned on, PFE will automatically break the text you type at the column specified in the Wrap Column edit control.

The Printing Area:

This area contains settings that affect how PFE prints the text in the current window. These settings become the defaults for the File Print command, but you can override them at the time of printing.

Check the Page Headers box if you want each page to be headed with the file name, the page number and the date.

Check the Wrap Long Lines box if you want lines that are too wide to fit the page to be wrapped to the next line on the page.

The File Modes Area:

This sets the file modes that apply to file, in all the windows that are showing it.

Check the Read Only box to make the file read only. With this mode set, you will not be able to change the file in any window showing it.

Check the Save In Unix Format box if you want all the commands that write the file to disk to do so in Unix format, using a single line-feed character as a line terminator.


The Options Current File/Window Modes Dialog

This dialog lets you set the window modes that apply to the current window, and the file modes that apply to the file that's showing in it.

SETTING THE WINDOW MODES

The Current Window area sets the window modes that apply to only the current window.

The Display/Input Modes Area:

This area contains settings that control how the text is displayed in the window, and any special actions PFE takes as you type.

Check the Auto Indenting box to have PFE indent new lines to the same level as the preceding line

Check the Strip Trailing Spaces box to have white space removed from the end of a line whenever you press Enter

Check the Show Line Numbers box to display line numbers in the window. You can also change this mode from the tool bar

Check the Overwrite box to have the characters you type overwrite those under the caret rather than being inserted in front of them. You can also change this setting from the status bar or with the Ins key.

To associate a language type with the window, select the one you require from the Language list.

The Screen Formatting Area:

This area contains settings that affect tabs and text wrapping.

The Tab Size edit control lets you define the width of a tab stop.

If you want PFE to insert spaces when you press the TAB key, check the Soft Tabs box. If the box is unchecked, PFE inserts a single TAB character.

Check the Wrap Enabled box to activate text wrapping. With this turned on, PFE will automatically break the text you type at the column specified in the Wrap Column edit control. You can turn also text wrapping on and off using the status bar.

The Printing Area:

This area contains settings that affect how PFE prints the text in the current window. These settings become the defaults for the File Print command, but you can override them at the time of printing.

Check the Page Headers box if you want each page to be headed with the file name, the page number and the date.

Check the Wrap Long Lines box if you want lines that are too wide to fit the page to be wrapped to the next line on the page.

SETTING THE FILE MODES

The Current File area sets the file modes that apply to the current file, in all the windows that are showing it.

Check the Read Only box to make the file read only. With this mode set, you will not be able to change the file in any window showing it. You can also change this mode using the status bar.

Check the Save In Unix Format box if you want all the commands that write the file to disk to do so in Unix format, using a single line-feed character as a line terminator. You can also change this mode using the status bar, and from the dialog started by the File Save As command. You cannot change the setting of this mode if the file is marked as read only.


The Edit Goto Line Dialog

This dialog lets you move to the start of an arbitrary line in the current window. You can move either to an absolute line number, or move up or down in the window by a given number of lines.

Steps

1	Enter the line number of the line you want to move to in the Line To Go To box. The dialog shows you the number of the last line in the current file, and of the line the caret is now in, for information.

To move to the first line in the file, enter the number "1".

To move to the last line in the file, you can give the actual line number, or type the word "end".

To move a number of lines up or down from the line that the caret is now in, enter the number of lines to move, preceded by either a "+" or a "-" sign respectively.

2	If you want to highlight all the text from where the caret now is and the start of the target line, check the Extend Selection box

3	Click the OK button to go to the target line


The File Print Dialog

This dialog lets you print some or all of the current file on your currently selected printer

Steps

1	To use a different printer from the one shown at the top of the dialog box; to change the printer font; or to change the page margins, click the Setup Printer button

2	Decide what part of the file you want to print by using the Print area:

Click Whole File (the default) to print everything

Click Selected Text to print exactly the text that is highlighted. This option will not be available if you don't have any text highlighted

Click Line Range, and fill in the start and end line numbers, to print a range of lines. You can use the words "start" and "end" to represent the first and last lines of the file

3	If you want to use different print options from those set by the window modes of the current window, click the boxes in the Options area:

If Number Lines is checked, lines are printed with numbering

If Wrap Long Lines is checked, lines too long to fit the page are folded rather than being truncated

If Page Headers is checked, each page starts with a header giving the file name and other information


The File Print Setup Dialog

This dialog lets you set up details of the printer that PFE is to use, and to run the printer's own setup dialog. Settings you make in this dialog are recorded and become the defaults.

You can set different values for each of the printers configured on your system.

Steps

1	If you want to use a different printer to the one that is highlighted in the Available Printers list, scroll the list and click the left button on the printer name

2	To change the margins used on each page, check or uncheck the boxes in the Print Options area. All margins are 0.5 inches wide

3	To run the highlighted printer's own setup dialog, click the Setup dialog.

4	To change the printer font that PFE will use for the highlighted printer, click the Font button

If you run the printer's own setup dialog after selecting a font, you may find that the font is no longer available; some printers offer different fonts in different operating modes.


The Template Create File Dialog

This dialog allows you to create a new, empty template file that you can use to store templates.

Template files have a file type of ".tpl"

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that you want to create the template file in

2	Type the name you want to call the template file, or select an existing name from the Files list. If you do specify an existing file, PFE will prompt you to confirm that you really want to overwrite it.

3	Click the OK box to create the file

If you prefer, you can simply type the name of the file to be attached directly into the File Name edit control rather than use the browse facilities.

About Templates


The Template Edit Dialog

This dialog allows you to edit a template contained in a template file. You must first have attached the template file, either automatically or with the Template Attach File command.

Steps

1	Select the template file containing the template you want to edit from the Template Files list. As you select a file, the list of templates it holds will appear in the Template Names list.

2	Select the name of the template to edit from the Template Names list

3	Click the OK button to edit the template and close the dialog

PFE opens a new edit window and copies the contents of the template into it for you to change as you require.

When you've finished amending the template, you can update the in-memory copy of the template file with the Template Store command, then save the changed template file to disk with the Template Save File command.

About Templates


The Template Store As Dialog

This dialog allows you to store a template that you're editing into any attached template file, giving it a new name in the process.

Steps

1	Select the template file into which you want to store the template from the Template Files list on the left. The list of templates already in this template file will be updated.

2	Type the name you want to give the template into the Template Name edit control on the right, or select the name of an existing template. A template name can be up to 16 characters long, and may contain spaces.

3	Click the OK button to store the template in the in-memory copy of the template file, under the new name, and close the dialog.

If the name you're using is that of an existing template, PFE will ask you to confirm that you really want to overwrite it.

Note that this operation changes only the in-memory copy of the template file. The file on disk will not be updated until you use the  Template Save File command.

About Templates


The Template Delete Dialog

This dialog allows you to delete one or more templates from a template file.  You must first have attached the template file, either automatically or with the Template Attach File command.

Steps

1	Select the template file containing the templates you want to delete from the Template Files list. As you select a file, the list of templates it holds will appear in the Template Names list.

2	Select the name of the templates to delete from the Template Names list. You can use Ctrl to add names to those selected, and Shift to select a range of names. You can also click and drag over a range of names.

3	Click the Delete button to delete the templates from the in-memory copy of the template file and close the dialog. To update the template file on disk, you need then to use the Template Save File command.

About Templates


The Template Detach File Dialog

This dialog allows you to detach one or more attached template files, freeing main memory, when you no longer require them

Steps

1	Select one or more template files from the list of those attached. You can use the Ctrl key to add files to the selection; or the Shift key to extend a selection. You can also select multiple files by clicking and dragging.

2	Click the OK button to detach the template files and close the dialog. If you've changed any of the templates contained in a template file, you'll be asked if you want to save the changes to disk or to discard them.

Once you've detached a template file, you can't use the templates it contains until you attach it again.

You can't detach a template file if you're currently editing any template that it contains.

About Templates


The Template Save File Dialog

This dialog allows you to save changes that you've made to one or more attached template files to disk, so that they become permanent.

Steps

1	Select the template files you want to save from the list. You can use Ctrl to add filenames to the selection, and Shift to select a range. You can also click and drag over a range of names.

2	Click the Save button to save the in-memory copies of the selected template files to disk and close the dialog. The previous contents of the template files will be overwritten

About Templates


The Template Insert  Dialog

This dialog allows you to insert a template from any attached template file into the current window.

Steps

1	Select the template file containing the template you want to insert from the Template Files list. As you select a file, the list of templates it holds will appear in the Template Names list.

2	Select the name of the template to insert from the Template Names list

3	Click the OK button to insert the template and close the dialog

The template will be inserted into the current window at the position of the caret. The caret will be positioned at the start of the inserted template data after this operation

About Templates


The File Open Dialog

This dialog allows you to open one or more files that already exist.

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that the files are in

2	Select the files you want to open in the File Name list box. You can use the Ctrl key to add filenames to those selected, and the Shift key to select a range of filenames. You can also click and drag across a sequential series of names.

3	If you want to open the files in read only mode, check the Read Only box. This will affect all the files you open in this operation.

4	Click the OK box to open the files

If you prefer, you can simply type the name of the file or files to open directly into the File Name edit control rather than use the browse facilities.

You can repeat steps 1 and 2 to open files from several drives and directories in the same operation.

The List Files of Type list at lower left allows you to restrict the files shown in the list to those matching specific filename patterns. By default, there is one entry - "*.*" - in this list, so you'll see all the files in each directory. You can configure the list to match how you want to work by editing the initialisation file.

Whether you close the dialog with the OK or the Cancel buttons, PFE will make its current working directory the one that the dialog is showing.

If you're already editing one of the files you specify, PFE won't load a new copy from disk, but will simply activate a window showing the file.


The File Save As Dialog

This dialog allows you to save the file in the current window to disk, in a file whose name you specify. The name you give for the disk file is then associated permanently with it the current window and all others showing the same file,

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that you want to save the file to

2	Either type the name of the file you want to save the data into in the File Name edit control, or select the name of an existing file you want to overwrite from the list box.

3	If you want to save the file in Unix format, check the Save In Unix Format box. For normal DOS format, make sure that the box is unchecked.

The setting you use here becomes the default for the next time you save this specific file.

4	Click the OK box to save the data to the file. If you've specified the name of a file that already exists, PFE will ask you to confirm that you really intend to overwrite it.

The List Files of Type list at lower left allows you to restrict the files shown in the list to those matching specific filename patterns. By default, there is one entry - "*.*" - in this list, so you'll see all the files in each directory. You can configure the list to match how you want to work by editing the initialisation file.

After you've saved the current file with this dialog, PFE will associate the name of the disk file with all the windows showing it. The File Save command will then write to this file automatically.


The File View Dialog

This dialog allows you to open one or more files that already exist in read only mode. Its action is exactly as if you used the File Open command and checked the Read Only box.

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that the files are in

2	Select the files you want to open in the File Name list box. You can use the Ctrl key to add filenames to those selected, and the Shift key to select a range of filenames. You can also click and drag across a sequential series of names.

3	Click the OK box to open the files

If you prefer, you can simply type the name of the file or files to open directly into the File Name edit control rather than use the browse facilities.

You can repeat steps 1 and 2 to open files from several drives and directories in the same operation.

The List Files of Type list at lower left allows you to restrict the files shown in the list to those matching specific filename patterns. By default, there is one entry - "*.*" - in this list, so you'll see all the files in each directory. You can configure the list to match how you want to work by editing the initialisation file.

Whether you close the dialog with the OK or the Cancel buttons, PFE will make its current working directory the one that the dialog is showing.

If you're already editing one of the files you specify, PFE won't load a new copy from disk, but will simply activate a window showing the file.


The File Name Dialog

This dialog allows you to change the file name associated with the file in the current window. The File Save command will then write to this file automatically.

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that you want to use in the file name

2	Either type the name of the file you want to save the data into in the File Name edit control, or select the name of an existing file from the list box.

3	Click the OK box to associate the new file name with the file in the current window

If you prefer, you can simply type the name of the file directly into the File Name edit control rather than use the browse facilities.

The List Files of Type list at lower left allows you to restrict the files shown in the list to those matching specific filename patterns. By default, there is one entry - "*.*" - in this list, so you'll see all the files in each directory. You can configure the list to match how you want to work by editing the initialisation file.


The File Write Dialog

This dialog allows you to save the file in the current window to disk, in a file whose name you specify. Unlike the File Save As command, the filename associated with the window is not changed.

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that you want to write the file to

2	Either type the name of the file you want to save the data into in the File Name edit control, or select the name of an existing file you want to overwrite from the list box.

3	Click the OK box to save the data to the file. If you've specified the name of a file that already exists, PFE will ask you to confirm that you really intend to overwrite it.

The List Files of Type list at lower left allows you to restrict the files shown in the list to those matching specific filename patterns. By default, there is one entry - "*.*" - in this list, so you'll see all the files in each directory. You can configure the list to match how you want to work by editing the initialisation file.


The File Insert Dialog

This dialog allows you to insert the entire contents of an existing file into the current window at the position of the caret.

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that the file is in

2	Select the file you want to open in the File Name list box

3	Click the OK box to insert the entire contents of the file

If you prefer, you can simply type the name of the file to be inserted directly into the File Name edit control rather than use the browse facilities.

The List Files of Type list at lower left allows you to restrict the files shown in the list to those matching specific filename patterns. By default, there is one entry - "*.*" - in this list, so you'll see all the files in each directory. You can configure the list to match how you want to work by editing the initialisation file.


The Edit Find Dialog

This dialog allows you to find occurrences of text strings.  Unlike most dialogs, you can continue to work in PFE while it is visible, so you can switch between your windows to search in several of them in one operation.

Steps

1	Type the text you want to search for in the Find What edit control. A special notation allows you to search for characters like "end of line" that you can't type. The notation uses the "^" character, so you must type this as "^^".

2	In the Direction area, set the direction of search. You can search up from the caret's current position to the start of the file, or down from the caret's position to the end of the file

3	Set up the search options you want to apply:

If the Match Case box is checked, PFE will match what you type exactly. If it's unchecked, upper-case and lower-case letters are taken as the same

If the Select Matching Text box is checked, PFE will highlight any matching text it finds. If it's unchecked, the text won't be highlighted

If the Extend Selection box is checked, PFE will highlight all the text from where the caret is now to the end of the matching text. You can only check this box if you've also checked the Select Matching Text box.

4	Click the Find Next button to perform the search. You can repeat this as often as you want.

If you want to search in some other window, simply activate it while this dialog is still on screen and click the Find Next button again.

5	To close the dialog, click the Cancel button.

After you've performed a search, you can repeat it very quickly with the Edit Repeat Last Find command, which will make the search without showing this dialog.


The Edit Replace Dialog

This dialog allows you to find occurrences of a text string and replace them with another.  Unlike most dialogs, you can continue to work in PFE while it is visible, so you can switch between your windows to make changes in several of them in one operation.

The search is always made from the current position of the caret down to the end of the file.

Steps

1	Type the text you want to search for in the Find What edit control. A special notation allows you to search for characters like "end of line" that you can't type. The notation uses the "^" character, so you must type this as "^^".

2	Type the text you want to replace it with in the Replace With edit control. The same notation is used for characters you can't type.

To simply delete occurrences of the search string, leave this edit control blank.

3	Set up the search options you want to apply:

If the Match Case box is checked, PFE will match what you type exactly. If it's unchecked, upper-case and lower-case letters are taken as the same

4	Select an operation you want to perform:

Clicking the Find Next button moves to the next occurrence of the search string

Clicking the Replace button replaces the current match (or the first match it finds after the caret), and moves to the next

Clicking the Replace All button replaces all matches automatically

5	To close the dialog, click the Cancel button.

You can repeat step 4 as often as you wish. To work in another window, simply activate it and choose an action from step 4.

After you've performed a replace operation, you can repeat it very quickly with the Edit Repeat Last Replace command, which will make the replacement without showing this dialog.


The Template Attach File Dialog

This dialog allows you to attach a template file, making the templates that it contains available for use.

Template files have a file type of ".tpl"

Steps

1	Use the Drive and Directory list boxes to select the disk drive and the directory that the template file is in

2	Select the file you want to open in the File Name list box

3	Click the OK box to attach the file

If you prefer, you can simply type the name of the file to be attached directly into the File Name edit control rather than use the browse facilities.

About Templates


The Execute DOS Command To Window Dialog

This dialog allows you to run a DOS program, such as a compiler, or an internal command such as dir, and capture the output into an edit window.

You can run only one DOS program at a time with this dialog.

You can't start a Windows application with this dialog; for that, use the Execute Launch Application command.

Steps

1	Type the DOS command line you want to execute into the Command edit control

To browse your directories to find the program you want to run, click the Browse button.

2	Type the path of the working directory you want the command to start in into the Working Directory edit control. If you leave this blank, the command starts in PFE's current working directory, which is shown at the top of the dialog.

3	Set the various options you want to apply:

If the Beep When Done box is checked, PFE sounds the standard system beep when the DOS program finishes.

If the Minimize Editor box is checked, PFE will make itself into an icon before running the DOS program

If the Save Changed Files box is checked, PFE will see if any of the files you're editing have changed, and will give you the opportunity to save the changes before running the DOS program. If you agree to save the changes, all the files you've altered will be written to disk.

If the Reuse Output Window box is checked, PFE will place the DOS program's output into the window used the last time you used this dialog. If not, a new output window will be created.

If the Show End Of Output box is checked, PFE will automatically scroll the window showing the output to show you the end of it rather than the start.

4	Click the OK button to run the DOS program.

The command line, working directory path and options are recorded, and become the default for the next time you use this dialog.

Under Windows 3, to change the properties of the DOS window used to run the program, use the standard PIF Editor to modify the PIF file $pfedos.pif

To repeat the operation exactly, use the Execute Repeat DOS Command to Window command.


The Execute Launch Application Dialog

This dialog allows you to launch a Windows application, or a DOS program, to run independently of PFE.

You can't capture the output of a DOS program launched with this dialog. For that, use the Execute DOS Command To Window command.

Steps

1	Type the command line for the application you want to launch you want to execute into the Command edit control

To browse your directories to find the application, click the Browse button.

2	Type the path of the working directory you want the application to start in into the Working Directory edit control. If you leave this blank, the application starts in PFE's current working directory, which is shown at the top of the dialog.

3	Set the various options you want to apply:

If the Minimize Editor box is checked, PFE will make itself into an icon before running the DOS program

If the Save Changed Files box is checked, PFE will see if any of the files you're editing have changed, and will give you the opportunity to save the changes before launching the application. If you agree to save the changes, all the files you've altered will be written to disk.

4	Click the OK button to launch the application.

The command line, working directory path and options are recorded, and become the default for the next time you use this dialog.


The Execute Launch Windows Tool Dialog

This dialog lets you launch one of the Windows Tools that you've configures in the list of Windows Tools with the Execute Configure Windows Tools command.

Steps

1	Select the name of the tool that you want to launch from the list at the lower left of the dialog. The command line and options that you defined for the tool will be shown.

2 	If you wish, modify the details of the command line shown in the Command Line edit control. .

3	If you wish, modify the options that apply in the Options area:

If the Minimize Editor box is checked, PFE will make itself into an icon when you launch the tool

If the Save Changed Files box is checked, PFE will see if you have changed any of the files you're editing before launching the tool, and give you a chance to save them.

4	Enter the path name of the directory that you wish the tool to run in into the Working Directory edit control. If you leave this field blank, the tool will be run in PFE's current working directory, which is shown at the top of the dialog.

5	Click the OK button to launch the tool.

The values you set in this dialog are recorded, and will be used as the defaults when next you launch the same tool. The Reset Command Line button can be used at any time to restore the command line to the one you defined originally.


The Execute Configure Windows Tools Dialog

This dialog lets you add entries to the list of Windows tools, and to delete or change existing entries.

About Windows Tools

ADDING A NEW ENTRY

To add a new entry to the list of Windows tools, do this:

Steps

1	Type the name you want to use for the tool in the Tool list at the top of the dialog. A tool name can be up to 32 characters long, and can contain spaces.

2	Type the command line you want to associate with the tool name in the Command Line edit control. You can browse your disks and directories to find the name of the executable module by clicking the Browse button.

3	Set the default options you want to apply to the tool name in the Options area:

If the Minimize Editor box is checked, PFE will make itself into an icon when you launch the tool

If the Save Changed Files box is checked, PFE will see if you have changed any of the files you're editing before launching the tool, and give you a chance to save them.

4	Click the Add button to add the tool name and details to the list.

5	If you have more tools to add, return to step 1; or follow the procedures below to change or delete other entries. When you've finished, click the Save button if you want to record the amended list permanently.

DELETING AN EXISTING ENTRY

To delete an existing entry from the Windows Tools lists, do this:

Steps

1	Select the name of the tool you want to delete in the Tool list at the top of the dialog.

2	Click the Delete button to delete the entry

3	If you have more tools to delete, return to step 1; or follow the other procedures given here to add or change other entries. When you've finished, click the Save button if you want to record the amended list permanently.

CHANGING AN EXISTING ENTRY

To alter some or all of the details of an existing entry in the Windows Tools list, do this:

1	Select the name of the tool whose details you want to amend in the Tool list at the top of the dialog.

2	If you want, modify the command line you want to associate with the tool name in the Command Line edit control. You can browse your disks and directories to find the name of the executable module by clicking the Browse button.

3	If you want, modify the default options you want to apply to the tool name in the Options area:

If the Minimize Editor box is checked, PFE will make itself into an icon when you launch the tool

If the Save Changed Files box is checked, PFE will see if you have changed any of the files you're editing before launching the tool, and give you a chance to save them.

4	Click the Change button to change the details associated with the tool name to those now set in the dialog.

5	If you have more tools to change, return to step 1; or follow the procedures above to add or delete other entries. When you've finished, click the Save button if you want to record the amended list permanently.


The Options Key Mapping Dialog

This dialog allows you to alter the functions that are invoked when you press certain keys. The dialog allows you map new keys to functions; to quickly change a key mapping; and to configure prefix keys.

The list box at the top of the dialog shows you the names of all the functions that you can map keys to. Many functions have menu equivalents, and their names reflect where they occur in the menus, or where they would occur.

The functions dictionary gives you a complete list of the functions and what they do.

Any changes you make to the key mappings apply only to the current session of PFE unless you save them.

About Key Mapping

SETTING PREFIX KEYS

PFE can be configured to use certain keys such as Esc and Ctrl+X as prefix keys, which introduce two-character command sequences. This extends the number of available command keys considerably.

By default, no prefix keys are enabled. To configure the ones you want to use, click the Prefix Keys button, which starts a sub-dialog.

Whenever you change which prefix keys are enabled, the lists of keys in the main dialog will be updated.

MAPPING A KEY TO A FUNCTION

To map a key that is current unmapped to a function, you use the upper part of the dialog.

Steps

1	Select the key you want to map to the function from the Available Keys list at the upper right of the dialog.

2	Select the function you want to map the key to from the functions list at the top of the dialog

3	Click the Map button to make the mapping. The name of the key moves to the Now Mapped From list at the upper left of the dialog, joining the names of any other keys mapped to the same function.

4	If there is menu item that corresponds to the function, and you want this new key mapping to be shown on the menu, select the key name from the Now Mapped From box, and check the Show On Menu box.

UNMAPPING A KEY FROM A FUNCTION

To unmap a key from a function, so that pressing the key no longer causes the function to be executed, you can do this in the upper area of the dialog:

Steps

1	Select the function concerned from the list at the top of the dialog.

2	Select the key of keys that you want to unmap from the function in the Now Mapped From list at the upper left.

3	Click the Unmap button to unmap the keys.

Alternatively, you can work in the central Keys In Use area of the dialog like this:

Steps

1	Select the key you want to unmap from the list of keys at the left. The function that the key is mapped to will be shown below the list.

2	Click the Unmap Key button to unmap the key from the function.

MAPPING A KEY TO A DIFFERENT FUNCTION

If you want to change the function that a key is mapped to from an existing one, you can unmap the key and the map it to the new function as described above, or do it in one operation in the central Keys In Use area:

Steps

1	Select the key you want to re-map from the list of keys at the left. The function it is currently mapped to will be shown below the list.

2	Select the function you now want the key to be mapped to from the list at the top of the dialog.

3	Click the Remap Key button to change the key mapping. The name of the key now appears in the Now Mapped From list at the upper left of the dialog, joining the names of any other keys mapped to the same function.

4	If there is menu item that corresponds to the function, and you want this new key mapping to be shown on the menu, select the key name from the Now Mapped From box, and check the Show On Menu box.

SAVING CHANGES

Changes you make in this dialog apply only to the current PFE session unless you save them.

To save the changes so that they become the default key mapping that PFE will use when it starts, click the Save button. To avoid the risk of accidental change, if you specified a key map file when you started PFE with a "/k" command line option, the Save button will not be available. In this case, you must always use the Save As button to save changes.

To save the changes into a key map file, so that you can manually load and apply them when you wish, click the Save As button. This starts a sub-dialog that lets you specify the name of a file into which the key mappings can be saved.

LOADING A SET OF KEY MAPPINGS

To load a set of key mappings that you've saved to a file with the Save As button, click the Load button. This starts a sub-dialog that lets you specify the name of a file containing mappings, which PFE will load and apply.


The Options Prefix Keys Dialog

This dialog lets you define which keys are used as prefix keys, or keys which start two-character command sequences.

About Key Mapping

Steps

1	Check the boxes for the keys that you wish to use as prefix keys.

2	Click the OK button to action the changes.

When a key is used as a prefix key, you can't map it by itself to a function. PFE will adjust the key mappings accordingly.


The Options Screen Font Other Dialog

This dialog allows you to choose the screen font that PFE will use to display text in all its edit windows. You can choose any fixed-pitch font that's installed in your system.

Steps

1	Select the name of the font you want to use from the Font list on the left.

2	If you want some other style than plain text, such as italic or bold, select this from the Font Style list in the centre of the dialog.

3	Select the size of the font, in points, from the Size list at the right. If the font you've selected is a scalable font - such as a TrueType font or one generated by Adobe Type Manager - you can choose any size between 6 and 24 points. Other fonts may offer only certain sizes.

4	Click the OK button to select the font and close the dialog.

PFE will use the font details you've chosen for all windows. The details are recorded and become the defaults.


The Printer Font Dialog

This dialog allows you to choose the printer font that PFE will use to print text on the currently-selected printer, whose name is shown at the top of the dialog. You can choose any fixed pitch font that the printer supports.

Steps

1	Select the name of the font you want to use from the Font list on the left.

2	If you want some other style than plain text, such as italic or bold, select this from the Font Style list in the centre of the dialog.

3	Select the size of the font, in points, from the Size list at the right. If the font you've selected is a scalable font - such as a TrueType font or one generated by Adobe Type Manager - you can choose any size between 6 and 24 points. Other fonts may offer only certain sizes.

4	Select the type face effects you want from the Effects area:

Check the Strikeout box to have the text printed with a strikeout line through it

Check the Underline box for underlined text

5	If your printer supports colour, select the type colour from the Color box.

6	Click the OK button to select the font and close the dialog.

PFE will use the font details you've chosen whenever you print to that printer. The details are recorded and become the defaults for the printer.

The details of the printer font set up for any other printers will not be affected.


The Exit Windows Dialog

This dialog allows you to close PFE and also terminate Windows 3 at the same time.

Steps

1	Select the way you want to close Windows

Click the Exit To DOS button to close Windows and return to a DOS prompt

Click the Exit And Restart Windows button to close Windows and then automatically restart it with the same options that you used previously

Click the Exit And Reboot System button to close Windows and perform a warm reboot of your system

Click the Exit, Run DOS Command And Restart button to close Windows, execute a single DOS program or batch file, then restart Windows. If you choose this button, enter the command line to run in the edit control below it. Note that you must give a full pathname to the .EXE or .BAT file. The Browse button will let you browse your disks and directories for the program to run.

If you're running PFE for Windows/16 in the Win16 subsystem of Windows/NT, all four options will simply log you off.

2	Click the OK button. If any of the files you're editing have been changed, PFE will ask if you want to save the changes; you can save them, discard them, or abandon the closedown altogether.

 Note that if you select the option to run a DOS command and restart Windows, and the executable is not found, or cannot be run for any reason, you will see no notification of the error.


The Exit Windows/NT Dialog

This dialog allows you to close PFE and either log off or close Windows/NT

Steps

1	Select the Windows/NT closedown action you want to perform

Click the Logoff User Only button to simply end all the applications you've started and log you off

Click the Logoff User And Shutdown System button to act as above, then close Windows/NT down so that you can power off your system

Click the Logoff User And Reboot System button to log you off, close down Windows/NT and perform a warm reboot of your system

You need to have SE_SHUTDOWN privilege for all but the first option.

2	If you want to force running applications that do not respond to close automatically, rather than having Windows/NT prompt you for each one, check the Force Other Apps To Close box.

3	Click the OK button. If any of the files you're editing have been changed, PFE will ask if you want to save the changes; you can save them, discard them, or abandon the closedown altogether.


The Browse Dialog

This dialog allows you to browse your disks and directories to find a file name that can be used by its parent dialog.

Steps

1	Use the Drives and Directories lists to move around your files until you find the directory containing the file you're interested in.

2	Select the name of the file from the File Name list on the left.

3	Click the OK box to close the dialog. The full path name of the file you've selected will appear in the appropriate edit control of the parent dialog.


The Select Window Dialog

This dialog allows you to select between many open edit windows. The list at the top of the dialog shows the window captions of some or all of the windows.

Steps

1	From the Windows Showing area, select the sort of window you want to see in the list:

Check the Named Files box to see windows showing files that have associated file names

Check the Unnamed Files box to see windows showing files that do not have associated file names

Check the Templates box to see windows showing templates

Check the Command Output box to see windows showing the output from DOS commands

2	If you want to see only windows containing changes that have not yet been saved, check the Changed Windows Only box

3	Either double-click the left mouse button on the name of the window you want to activate, or select it and press the OK button

The settings of the check boxes are remembered, and become the default for the next time you use the dialog.


The Most Recently Used Files Dialog

This dialog allows you to select a file from the list of those you've used most recently, and open it.

Steps

1	If you want to change the order in which the file names are presented in the list at the top of the dialog, click the appropriate button in the Sort Order area:

Click the Last-used First button to order the list so that the file you opened most recently is at the top

Click the Alphabetical button to sort the list in alphabetical order

2	If you want to see the full path name of every file in the list, check the Show Full Pathnames box. If this box is un-checked, PFE will shorten filenames as far as possible, making them relative to the current directory.

3	To open a file from the list, either double-click its name in the list with the left mouse button, or select the name and press the Open button.

The settings of the check boxes and sort buttons are remembered, and become the default for the next time you use the dialog.


Save Changes?
Save Changes To File?

You have changed this file since the last time you saved it to disk. Before PFE closes it, you have a chance to update the disk copy.

Yes	Click this button to save the contents of the window to disk. If the file hasn't yet got a name, you'll see a dialog asking you to specify the file to save to.

No	Click this button to irretrievably discard the changes you've made since the last save.

Cancel	Click this button to abandon the operation completely and return to editing the window.


Save Changes To Template?

You have changed this template since the last time you stored it in the in-memory copy of a template file. Before PFE closes it, you have a chance to update the in-memory template file.

Yes	Click this button to save the contents of the window to an in-memory copy of a template file. If the template hasn't yet got a name, you'll see a dialog asking you to specify what to call it, and what template file you want to store it in.

No	Click this button to irretrievably discard the changes you've made since the last save.

Cancel	Click this button to abandon the operation completely and return to editing the window.

Storing a template in an in-memory copy of a template file does not update the template file on disk; you need to use the Template Save File command for this.


Cannot Detach Template File

You cannot detach a template file if you are editing one or more of the templates it contains.

Steps

1	For each of the windows containing such templates, use the Template Store or Template Store As commands to save changes you want to keep, then close the window with the Window Close command.

2	Preserve the changes to the template file itself with the Template Save File command

You will then be able to detach the template file.


Invalid Line Number

You have entered an invalid line number in the Line To Go To edit control. Check that what you have typed is either a numeric string, or is the word end.

If you have typed a number preceded by either + or - to specify a line number relative to the line that the caret is now in, check that the resulting line number is not less than 1, or greater than the number of the last line in the file


Default Printer Not Configured

Whenever you exit from PFE, the name of the printer you last used is recorded in its initialisation file. This device is used as PFE's default printer the next time you start the program.

While starting this session, PFE has detected that the printer/port combination you used last time is no longer configured in your system. PFE will now use the Windows default printer unless you specify otherwise. You can check that this is what you want, and correct it if not, by using the File Print Setup command.


A word is defined as a sequence of alphanumeric characters, delimited at each end by white space or punctuation. If the window has been set with a window mode of "C language" the underscore character is treated as alphanumeric


To represent characters that you can't type in the Edit Find and Edit Replace dialogs, and in the search string specified in the EditFind DDE command, use this notation:

^t represents a TAB character

^n represents the end of a line

^^ represents the ^ character


PFE can capture the output of any DOS program that writes to the standard output or standard error files stdout and stderr. Output displayed by writing directly to video memory can't be captured.


MAPI is the electronic mail protocol devised by Microsoft and used in their Microsoft Mail 3.0 application. Other vendors such as Novell use different mail systems; currently PFE does not support them


To establish a DDE link to the Windows/16 version of PFE, whether under Windows 3.1 or the Win16 subsystem of Windows/NT, use the service name PFE. To link to the Windows/NT version, use the service name PFE32


This help file was created for Programmer's File Editor version 0.04.009