Porting Central
Skip to main content

Porting Central

EZ: A Multi-Media Editor

What EZ Is

EZ is an editing program that you can use to create, edit, and format many different types of documents. This document tells you how to use EZ to create and edit text documents. For details about using EZ to edit source code files see srctext: a superset of all source editing packages. For details about creating and editing non-text types of documents with EZ or inserting other media into EZ text documents, see Multi-Media Documents: Understanding Insets.

This help document is designed to be both an introduction for new users of EZ and a reference guide for more experienced users. Once you are familiar with the basics of EZ, you may wish to explore its many other features; details on how to do so appear in the Other Features of EZ and Related Topics sections at the end of this document.

Starting EZ

To begin working with ez, move the cursor into your command window (it is usually a typescript or xterm). At the prompt, type ez, followed by the name of the file you want to edit and press Enter, like this:

ez filename

Like many Andrew programs, EZ runs in its own window, so typing "ez filename" will cause a new EZ window to appear with the contents of the file called filename in the body of the window (if filename names a new file, the window will be blank).

You can open two EZ windows simultaneously by typing:

ez filename1 filename2

Advanced users may even wish to be able to open more than two files at a time at the start of an EZ session. See the section on EZ in the preferences help document to learn how to make this possible.

You can also create files that have "extensions" in their names, like this:

ez filename.extension

Some file extensions cause EZ to provide you with special editing tools. See the ez-extensions help document for details about these extensions.

Warnings about starting EZ: If you start EZ without naming a file to edit, EZ will create a new, empty window titled "Scratch". You can type and edit in this window normally. However, to save the "Scratch" document, you must use the Save As command on the File menu card, and enter the name of a file to save the document in.

Quick Reference

ez [option] filename
OptionDescription
-rEdit the next file you specify in read-only mode.
-wCreate a new window containing the next file you specify.
- Read buffer from stdin.
+numStart with the cursor on paragraph num.
-flForce loading of your EZ initialization file. Use this option to test your .ezinit file after making changes. Any errors will appear in a "StartupErrors" buffer.
-niDo not read any initialization file. This allows you to start EZ to fix a mistake in an initialization file.
-dDon't fork. Use this in shellscripts if you want subsequent commands to wait until you've quit EZ.

Inserting Text and Moving Around in the EZ Window

Inserting text at the caret. To begin inserting text in an EZ document, move the mouse cursor into the EZ window. Notice that there is a small black triangle in the upper left hand corner of the EZ window (at the beginning of the document). This is the text caret, which marks your current position in the document. Any text you type appears immediately to the left of the text caret.

It is important to distinguish the mouse cursor from the text caret. The mouse cursor (which becomes a black arrow with a curved tail while inside a window) indicates the current "focus of attention" of your workstation. In EZ, you use it to help you move the text caret around. The text caret itself marks your location in the document. Only the location of the text caret, and not the location of the mouse cursor within the window, determines where the text you type appears.

(For information on entering non-English letters and symbols see compchar.)

Wrapping text. An important thing to notice is that EZ automatically "wraps" text as you insert it. Wrapping means that when a line of text reaches the edge of the window, EZ automatically moves the next word to the next line. Thus no carriage returns are necessary between lines. Do not press Enter to add carriage returns unless you want to start a new paragraph or leave a blank line in your text. Adding extra carriage returns causes formatting errors in the printed form of your document.

Moving around in EZ. If you wish to insert text (or otherwise work on your document) somewhere other than at the beginning of the document, you must move the text caret. You do this with the aid of the mouse cursor and scroll bar.

If the place where you wish to begin working is visible in the window, simply move the mouse cursor to the exact position where you wish to insert text. Click the left mouse button, and the text caret "jumps" from its previous location to appear there.

To move to a part of your document that is not currently visible in the window, use the scroll bar (see The Scroll Bar). Once you have found the desired part of your document, point the mouse cursor at the exact location where you want to work and click the left mouse button.

Deleting, Moving and Copying Text

Deleting text. If the text that you wish to delete from your document is very short (say a word or two), it is probably simplest to move the text caret to the end of the offending section and backspace over it (by pressing Backspace or Delete).

To delete longer stretches of text, it is best to use EZ's selection and menu features, which allow you to select a section of text and perform a function on the whole section at once. The easiest way to select a piece of text is to use the following steps:

  1. Move the cursor to the beginning of the text you want to select. Press the left mouse button to place the text caret at that point.
  2. Move the arrow cursor to the end of the text you want to select.
  3. Press the right mouse button to complete the selection. The selected text appears in reverse video (white characters in a black box).

To make a selection box disappear, click the left mouse button.

(For information about other ways to select text, see Selecting Text. Also, if you are not familiar with how to make menus appear and how to choose options from them, you may wish to see Working with Menus before continuing.)

Once you have selected the area you wish to delete, bring up the menus and select the Cut option from the front menu card. The selected area disappears.

Moving text. Text that you have deleted by choosing the Cut option does not actually disappear forever -- EZ stores it in the cutbuffer. The cutbuffer is a special file for temporary storage of text that you have cut or copied. Using the Paste menu option, you can not insert any text or objects except for the very last selection that was Cut. Using keyboard commands, however, you can cycle back through the last eight previously Cut items that are held in a "cut ring." See The Andrew cutbuffer for more information.

Copying text. You can place the same text in more than one place in your document without having to type it more than once, by choosing Copy from the front menu card after selecting a text region. The selected text region does not disappear, but is stored in the cutbuffer nonetheless. Move the text caret and choose Paste from the front menu card to insert the copied text at the new location.

Cutting, copying, and pasting text in multiple windows. A useful feature of EZ (and Andrew) is that it allows you to delete and move text not only within one document, but also into and out of virtually any window on your screen. So, for example, you can copy part of your EZ file into a mail message, into another EZ file, or even into the command window. You can also cut, copy, or paste text from those windows into your EZ document. There are some restrictions, however. You can use the Cut and Paste options only in files that belong to you. Other files (including help documents such as this one, and files belonging to other users) are in "Read Only" mode. This means you can only copy text from them; you cannot delete or add anything.

Formatting Styles: Changing Fonts

Adding styles. You can alter the appearance of the text in your EZ files in numerous ways by adding format commands called "styles." To add styles you use EZ's selection and menu features. If you read the previous section on Deleting text, you already know how to select text and choose from menus.

Once you have selected a text region, you can choose style options from four of the menus that appear, which are labelled Font, Justify, Title and Region (these cards only appear when a region is selected). Some of the options on these cards change the typeface of the text (making it bold or italic, for example), other options change text positioning (providing indenting or centering) and others do both. For easy reference, the section below on Pop-Up Menu Meanings summarizes all the available functions.

You may add more than one style to the same piece of text if you wish, by choosing one style and then another while the region is still selected. You can also embed styles, adding a further style to a portion of a region that already contains a style (this example shows a bold subregion in a region of italic style). However, you should use multiple styles sparingly, because removing them is not always as easy as adding them.

Listing styles. To see exactly what styles apply to a region of text in your document, use EZ's style-listing feature:

  1. Position the text caret in the text that you want to check.
  2. Press Esc-s (the Esc key followed by "s".)

Typing Esc-s gives you two kinds of information:

  1. The message line at the bottom of the screen lists all the styles that apply to the region where the text caret is placed.
  2. Esc-s also automatically selects the text region associated with the first style in the list.

Removing a single style. To remove a single style, place the text caret anywhere within the styled region. Choose Plainer from the front menu card. You can also use Plainer after selecting the single-styled region, if you want the greater degree of control afforded by selecting.

Removing all styles from a region. If you have added several styles to a region and now wish to remove all of them, select the desired region, and then choose Plainest from the front menu card. All of the styles that apply only to the selected region are removed.

Removing embedded styles from a region. Removing only some of the multiple styles that you have added to a region can become complicated. To avoid costly mistakes, you should understand and use EZ's style-listing feature to help you remove only the styles you wish and only from the desired region.

For more information on manipulating styles, see Using Styles in EZ.

Formatting Text: Line Spacing, Setting Tabs, and Setting Margins

Using LookZ, the style editor

By default, EZ documents are single-spaced, have left and right margins of 1 1/4", and have tab stops set every half-inch. To change these settings, you must use the LookZ style editor, which you invoke with the Edit Styles menu option.

LookZ allows you to create new styles which have the attributes of double-spacing, new margins, or anything else you want. You can then add these styles to sections of your document. You can also change the "global" style of the document, which affects all the text in the document.

To create a new style, choose Add Style on the front menu card in the LookZ ("Style Editor") window. You will be prompted for a name for the new style. The name you enter should contain two parts: the name of the menu card the style will appear on, and the name of the style itself, separated by a comma. (There should not be any space before or after the comma. Also, if you have already highlighted the name of a menu card in the top left-hand panel of the LookZ window, the name of that menu card and the comma will already be filled in at the prompt. If they are already filled in, you need only enter the style name after the comma.)

When you enter the style name, it will appear in the top right-hand panel of the LookZ window, along with all the other styles on that menu card. Click on it to highlight it. You can now use the controls in the lower part of the LookZ window (below the double line) to give the new style any attributes you want. See the LookZ help file for information on what the various attributes mean, and how to use them.

If you highlight "<No Menu>" in the top left-hand panel, the top right-hand panel will list any styles that are not available on menu cards. Normally, there is only one such style, called global. This is the style that your entire document is displayed in. If you make changes to this style, all the text in your document will be affected. This is an easy way to double-space or change the margins for a whole document.

When you have finished creating and editing styles, choose Update Document on the front menu card of the LookZ window. This will cause your original EZ document to be redrawn with the updated style definitions, and will also add any new styles to the EZ menu cards. You can then go back to the EZ window and use the new styles.

To remove the LookZ window, choose Delete Window. Do not use the Quit option; this will quit both the LookZ and EZ windows.

Formatting Text: Page Breaks

Creating and deleting pagebreaks. All text that is entered into an EZ window becomes automatically paginated upon printing or previewing. EZ simply inserts a page break into the document when no more information can fit onto the current page. There are, however, times when you may want to insert a page break before a particular page is completely filled. EZ lets you do this through the use of a pagebreak inset.

Creating a pagebreak. To add a pagebreak, place the text caret at the desired page break position, and select Insert Pagebreak from EZ's Page menu. EZ places a line across the page to mark the position of the pagebreak.

Deleting a pagebreak. To remove the pagebreak, position the text caret to the right of the grey line and backspace. The message,

  Really delete inset(s)?

is printed in a dialogue box. Click in the appropriate box (either yes or no) to continue or abort the deletion. When properly deleted, the pagebreak inset vanishes, leaving only the text caret in its place.

To see the effects of both pagebreak insets and ordinary pagination, use EZ's Preview option (for more information, see the Previewing and Printing section below).

Moving between pagebreaks. Pagebreak insets in a document are useful for a number of reasons. Not only do they allow you to control the positioning of pagebreaks, but they also enable you to move around more easily in lengthy documents.

To move to the next occurrence of a pagebreak, select Next Page from EZ's Page menu. The text automatically scrolls so that the pagebreak is positioned at the top of the window. The Previous Page option, also located in the Page menu, works in a similar manner, but searches instead for a pagebreak inset occurring before the current text caret position.

By strategically positioning pagebreaks at the end of specific chapters or sections, you can use EZ's Next Page and Previous Page options to move directly between different portions of the document.

Footnotes

Many formal documents require numbered footnotes in order to better organize various bits of information. EZ provides a useful footnote option that allows you to easily create and manage footnote entries. For more information, see the ez-footnotes help file.

Table of Contents

Constructing a table of contents manually can be rather difficult and time consuming. In order to help you with this task, EZ has a Table of Contents option which automatically creates a table of contents from an existing document. It is also useful as an interactive table of contents for viewing documents on-line. For more information, refer to the ez-contents help file.

Index

In addition to the Table of Contents feature, ez also allows you to create different types of indexes for your document. For more information, refer to the ez-index help file.

You can also cross reference different parts of a file using reference insets. See the ez-refs help file.

Previewing and Printing

Previewing. Even though you can see the styles that you apply to the text in your document, the EZ window does not always show everything exactly as it will appear in the printed version. For example, the screen is more restricted than a printer in the typeface sizes it can display. You can see more exactly how your completed file will appear on the printed page by choosing the Preview option from the File menu card. This option opens a separate Preview window containing your document.

Printing. You can print your file by choosing the Print option from either the File menu card in EZ or the front menu card in Preview. This option invokes a special printing program for EZ files. See the ezprint help document for more information. You can also use the Set Printer option (described in the Pop-Up Menu Meanings section below) to change the name of the printer where your file is sent for printing.

By default, EZ prints your files in the same bodyfont that is used to display them on the screen. To print EZ files (as well as files from all BE2 programs) in a different font than the one used for screen display, use the print.Bodyfont preference to set a new font. See the section on Printing in the preferences help document for details.

Postscript. You can create a PostScript file from an EZ document by following the instructions in ez-ps help file.

Saving and Quitting

Saving. To save the document you are editing in the EZ window, choose the Save option from the front menu card. When the document is saved into a file, the message "Wrote File" and the pathname of your file appear in the message area at the bottom of the window.

It is recommended that you choose Save frequently while you use EZ, in order to minimize the amount of work you might lose if for some reason the EZ session ends unexpectedly. For more details on this aspect of EZ, see the ez-buffers help document.

Quitting. To quit using EZ, choose the Quit option from the front menu card. If you try to quit without saving changes you have made to the text, you are prompted to save the changes you have made.

Note: if you have worked with multiple files during the EZ session and have not saved all of them, you may continue to be prompted, even though you choose Save in the current window before trying to quit. See the ez-buffers help document for more information on working with multiple files.

Checkpointing

EZ provides another safeguard against loss of your work, in addition to the frequent saves that you should make. After you have made changes to a file once, EZ begins to save your work automatically in "checkpoint" files. A checkpoint file has the same name as the file in which your document is stored, with the additional extension .CKP. If the EZ session does end unexpectedly, you can recover most of the changes you made by finding the .CKP file in your directory and using mv to convert the .CKP file into the regular version of the file. (Note that normally the .CKP file associated with a document does not appear in your directory because choosing Save removes it.)

You can tell when EZ is checkpointing your document because the clockface cursor appears on the screen in place of the arrow cursor, and the message line displays "Checkpointing. . . ". At those moments, anything that you type will not appear in the window until after the clockface disappears.

Changing checkpoint frequency. By default, EZ will checkpoint your document about every two minutes. Should the EZ session end unexpectedly, you will lose only the changes you made in the last two minutes. However, some users find the pause required while a file is checkpointing to be annoying, especially with long documents. You can change how often EZ checkpoints your documents by changing the ez.CheckpointMinimum preference in your preferences file. See also the Other Features of EZ section below.

Pop-Up Menu MeaningsEZ provides two kinds of menu cards. "Main" menu cards are always available. When you select a text region, EZ adds "selected region" menu cards to the Main ones. The menu cards and options discussed in this section appear when your EZ file does not have one of the special extensions listed in the ez-extensions help document. The menus available in files with special extensions may differ slightly.

Main Menus

The menus listed in this section are available at all times, whether you have a selected region or not. Some of the particular options, however, are only available when there are no selected regions. Such options are marked below.

Front Menu Card

Paste: Inserts cut or copied text back into a document at the text caret. You must have previously cut or copied something for Paste to work. Only available when there are no selected regions.

Save: Saves all changes in the file that you are editing. After your file has been saved, the message "Wrote file" appears in the response line, followed by the pathname of the file that was saved.

Switch file: Replaces the current file in the buffer with a new file that you specify. A dialogue box comes up, prompting you to save any changes before it switches to the new file. To learn what buffers are, and how they work in EZ, see the ez-buffers help document.

Plainer: Removes the "innermost" style from the region of style application where the text caret is placed. (A similar option on the selected region menus, Plainest, removes all styles that apply only to the selected region of text. See the ez-styles help document for details.)

Delete Window: Deletes the window you are in.

Quit: Quits all windows and buffers associated with the current EZ process. (To learn what is meant by the terms "buffer" and "process," see the ez-buffers help document.) If you try to quit without saving changes you are prompted to save.

If you have worked with more than one file during the EZ session and have not saved all of them, you may continue to be prompted.

Search/Spell Menu Card

For more information about the four searching options listed below or about the use of regular expression searching in EZ, see the searching help document.

Forward: Searches forward from the position of the text caret for the set of characters you specified. After you choose this option, EZ puts the "Find:" prompt in the message region. Type the word or phrase that you want to search for and press the Enter key. If any of the following characters are in the search string,
[ ] * . \
precede them with a backslash (\).

Backward: Searches backward from the text caret for the character string that you specify.

Search Again: Repeats the previous search.

Query Replace: Finds the character string that you specify and replaces it with a second character string that you specify. See the query-replace help document for details.

Check Spelling: Checks your spelling throughout the document. (See Check Spelling: The Spellchecker Menu Option)

Page Menu Card

Insert Pagebreak: Places a pagebreak inset at the position of the text caret.

Next Page: Moves the text caret to the next page break inset and scrolls the document to that point.

Previous Page: Moves the text caret to the last page break inset and scrolls the document to that point.

Insert Footnote: Places an opened footnote inset at the position of the text caret. For more information, see the ez-footnotes help document.

Open Footnotes: Opens every footnote inset in the current document. For more information, see the ez-footnotes help document.

Close Footnotes: Closes every footnote inset in the current document. For more information, see the ez-footnotes help document.

Table of Contents: Opens a Table of Contents window for the current document. For more information, refer to the ez-contents help document.

File Menu Card

Save As: Saves the current file with a new name. When the "Write to file:" prompt appears, it contains the pathname of the current file. To save the file with a new name, backspace over the old name, type in the new name, and press Enter.

Save All: Saves the changes to all of the files that are contained in buffers. (To learn what buffers are, and how to use them in EZ, see the ez-buffers help document.) It also saves newly-created buffers into files if you have named them. Buffers that do not have names will not be saved.

Insert file: Prompts you for the name of a file to be inserted at the text caret position. The file can be in non-text formats (Table, Raster, Eq, Fad, Figure).

Set Printer: Prompts you for the name of the printer you want for files printed during this EZ session (and lists the name of your current default printer). Type the name of the new printer and press Enter, or just press Enter to keep the default setting.

Preview: Starts the Preview program on the current document to show what the document will look like when printed.

Print: Submits a printing request for the document.

Add Template: Prompts you for the name of a document template that will be added to the document. For information about the system templates that are available, see the templates help document.

Selected Region Menus

The following menu cards appear only when there is a selected region in an EZ window. When you choose one of the options listed here, it will affect the selected text.

Front Menu Card

The following three options are added to those on the Main menus front menu card. (In addition, Paste does not appear when Cut and Copy do.)

Cut: Deletes the selected text and stores it in the cutbuffer. You can put the text you cut most recently back into any window by choosing Paste.

Copy: Copies the selected text into the cutbuffer. You can put the text you copied most recently back into any window by choosing Paste.

Plainest: Removes all styles that apply only to the selected region.

Font Menu Card

Bold: Makes the selected text appear in boldface.

Italic: Makes the selected text appear in italics.

Superscript: Decreases the size of the selected text by 2 points (a point equals 1 / 72 of an inch) and prints the text above the default baseline.

Bigger: Increases the size of the selected text by 2 points. The 2 points are added to the text size specified in your ez.bodyfont preference. The text may not appear to change on the screen if there is no screen font that is 2 points larger than the current one. However, when you print the document, the text will be printed out with the larger font.

Smaller: Decreases the size of the selected text by 2 points. The 2 points are added to the text size specified in your ez.bodyfont preference. The text may not appear to change on the screen if there is no screen font that is 2 points smaller than the current one. However, when you print the document, the text will be printed out with the smaller font.

Subscript: Decreases the size of the selected text by 2 points, and prints the text below the default baseline.

Typewriter: Prints the selected text in a fixed-width font.

Justify Menu Card

Center: Centers the selected text.

FlushLeft: Justifies the selected text to the prevailing left margin.

FlushRight: Justifies the selected text to the right margin.

Title Menu Card

Major Heading: Makes a heading that is centered and in a bigger size than the surrounding text.

Heading: Makes a bold heading and moves it to the left of the default left margin.

Subheading: Makes a bold heading that is flush with the default left margin.

Chapter: Makes a bold heading that is flush with the left margin and increases its size by 4 points compared to the surrounding text.

Section: Makes a bold heading that is flush with the left margin and increases its size by 2 points compared to the surrounding text.

Subsection: Makes a bold heading that is flush with the left margin.

Paragraph: Makes an italic heading that is flush with the left margin.

Region Menu Card

Quotation: Indents the left and right margins of the selected text and makes the text italic.

Description: Creates a "hanging indent" or "outdented" paragraph by indenting the left margin of all but the first line of text.

Example: Indents the left margin of the selected text and displays it in a fixed-width font.

Display: Indents both the left and right margins of the selected text. The text at the right margin is ragged (not justified).

Indent: Indents both the left and right margins of the selected text. Both margins are justified.

Left Indent: Indents the left margin of the selected text.

Format Note: This special style is used around commands from the formatting package called troff.

Other Features of EZ

Now that you know how to use EZ's basic features to create text documents, you may wish to learn more about "fancier" features of EZ. The following list briefly describes many of these features and tells you how to get more information.

Creating an EZ initialization file. EZ allows you to create your own initialization file (called an .ezinit file). This allows you to add to or change EZ's menu options and keybindings, and the meanings of filename extensions. To learn how to do so, see the initfiles help document. Creating your own .ezinit causes EZ to ignore the global initialization file, which includes many default settings.

Creating files with special extensions. Certain file extensions (such as .c, .h, .concept, .help, .letter, .raster, or .table) cause EZ to provide you with special programming packages (called insets) appropriate for information in different formats, or with templates for text may contain menu options different from the ones described in this file. If you don't want these special templates or packages, recreate the files with a different extension. For information about how EZ interprets file extensions and assigns templates, see the ez-extensions and initfiles help documents.

Editing other types of documents with EZ. You can edit non-text documents with EZ or include "insets" (such as pictures or tables) containing different types of information in an EZ document. See the insets overview for details.

Changing checkpoint frequency. By default, EZ will checkpoint your document about every two minutes. Should the EZ session end unexpectedly, you will lose only the changes you made in the last two minutes. However, some users find the pause required while a file is checkpointing to be annoying, especially with long documents. You can change the frequency of checkpointing in EZ by changing the value of ez.CheckpointMinimum in your preferences file; see the section on EZ in the preferences help document for details.

You can also add an option to your EZ menus that allows you to change the checkpointing frequency only for the file you are currently working on. To make the option Set Ckp Time appear at the bottom of the File card, use Copy to put the following line into your .ezinit file (do not type it yourself):

addmenu ezapp-set-buffer-checkpoint-latency "File,Set Ckp Time~32" frame

Note: If you use the line above, BE SURE to read the initfiles help document, especially if you do not already have an .ezinit file.

Changing justification of text. By default, EZ displays and prints left and right justified text. If you want to have text with a ragged right margin, include the ez.justified preference in your preferences file and type "off." See the section on EZ in the preferences help document.

Producing Scribe Files. You can use EZ to produce .mss files for the Scribe formatter. Just remember not to include any EZ styles because Scribe does not know how to interpret EZ's style commands. You may want to use Plainest on the whole .mss file.

Editing DOS files. EZ can be used to edit DOS files (with CR+LF sequences for every newline). It removes the CRs to make it more convenient to edit, and adds them back in to the saved file automatically. See the EZ section of the preferences help for details on customizing or disabling this behavior.

Using multiple windows and buffers. EZ provides many features for working with multiple windows and buffers. The ez-buffers help document describes how files, buffers and windows work in EZ, and how best to use them. It also explains how to use keybindings and menu options to access EZ's file, buffer and window manipulation functions. A more succinct list of the keybindings is available in the ez-keys help document.

Using the srctext editing package. The srctext package contains a set of indentation and commenting features designed for C, C++, Modula-2, Modula-3, Java, perl, etc, programmers. Documents created with typical language file extensions receive the package by default, unless you modify your .ezinit file to map these extensions differently. You can also map additional extensions to ctext, if you wish.

Preferences

There are numerous features of EZ that you can change if you do not like the default values set by system administrators. These features include the font used in the EZ window, how often EZ checkpoints files, how long messages stay on the message line, and whether text is right justified. If you are satisfied with the settings of these features, you do not need to do anything. If you would like to change them see Preferences and System Defaults for details. If you would like to add menu items, keybindings or button bars see Setting up and using initialization files.

Related Topics