Previous Next Chapter

ED

ED is a full screen ASCII text editor that uses menus and function keys to access ist features. It is easy to use and is suitable for editing scripts, startup files, MountLists, and other simple files. Use either a mouse or the keyboard to perform operations with ED. Although ED's menus are preprogrammed, when you are familiar with the program, you can reconfigure them as needed.

Note:

The bottom line of the ED window is the status line used for displaying messages, prompts, and commands. Error messages displayed on the status line remain until you enter another ED command. Figure 4-1 illustrates the ED window showing the status line.

Figure 4-1. ED Window with Status Line

The format for ED is the following:

ED [FROM] <filename> [SIZE <n>] [WITH <filename>] [WINDOW <window specification>] [TABS <n>] [WIDTH | COLS <n>] [HEIGHT | ROWS <n>]

The FROM argument specifies the source file to be edited. This argument is required, but the FROM keyword is optional.

The SIZE argument changes the ED buffer size. ED has a default text buffer size of 40,000 bytes. For example:

1> ED Script SIZE 55000

increase the size of the buffer to 55,000 bytes.

The WITH argument specifies an ED command file that can contain any sequence of ED extended mode commands. When WITH is specified, ED executes the commands contained in the command file. The WITH argument's keywords is required if you use WITH.

The WINDOW argument specifies the console type, such as RAX:0/0/640/256/EdWindow or CONSOLE:. The WINDOW argument's keyword is required if you use WINDOW.

TABS sets the tab stop interval, which is the number of spaces to the right that the cursor moves when you press the Tab key. The default value for TABS is 3.

The WIDTH and HEIGHT arguments adjust the size of the ED window by specifying the number of characters to display horizontally and vertically. By default the ED window is 640 x 200 picels or approximately 88 characters wide by 21 lines high.

Starting ED

Start ED from a Shell or with the Workbench Execute Command menu item. Open ED at the prompt by entering ED and a new or existing file name, as follows:

1> ED <filename>

where <filename> is the name of an existing file or a new file to be used for saving your work. If the file name specified cannot be found in the current directory, ED opens a blank window and displays the message Creating new file.

Using ED

All ED commands have key sequences and many are available through menus. You can enter ED commands in either of the following ways:

  1. By choosing the command's menu item.
  2. By typing in the command's key sequence and pressing Return.

In addition, you can use the mouse to perform some commands, such as those that control cursor movement.

You can work on files in ED with the following two command modes:

Immediate

Extended

Immediate Commands

In immediate mode, ED executes commands right away. Specify an immediate command by pressing a single key or Ctrl+key combination or by using the mouse. All immediate commands have corresponding extended versions.

Immediate commands control the following:

Moving the Cursor in Immediate Mode

The cursor can be positioned anywhere in text by moving the pointer to the desired spot and clicking the selection button. To move the cursor with the keyboard, use the arrow keys, Tab, and Ctrl+key combinations.

Note:

Move the cursor one position in any direction by pressing the appropriate arrow key. If the cursor is on the right edge of the screen, ED scrolls the text to the left do display the rest of the line. ED scrolls the text vertically one line at a time and horizontally ten characters at a time. You cannot move the cursor beyond the left edge of the line. If you try to move the cursor beyond the top or bottom of the file, ED displays a Top of File or Bottom of File message.

Additional key combinations that control cursor movement are:

Shift+up arrow

Top of the file.

Shift+down arrow

Bottom of the file.

Shift+left arrow

Left edge of the ED window (regardless of the margin setting).

Sift+right arrow

End of the current line.

Ctrl+]

Right edge of current line (if cursor is already there, it is moved to the left edge).

Ctrl+E

Start of the first line on the screen (if cursor is already there, it is moved to the end of the last line on the screen).

Ctrl+T

Start of the next word.

Ctrl+R

Space following the previous word.

Tab

The next tab position (multiple of the TABS value; 3 by default).

If your file has more lines than can fit in the ED window, you can scroll through the file vertically. Scroll one line at a time by pressing the up or down cursor key to move in the corresponding direction. Move the text in jumps by pressing:

Ctrl+D

Moves 12 lines down through the file.

Ctrl+U

Moves 12 lines up through the file.

These commands do not move the cursor position in the window; they redraw the text in the window with the new line at the cursor position.

If something disturbs your screen, such as an alert from another program appearing in the ED window or message remarks in the status line, press:

Ctrl+V

Refreshes the window display.

Top Previous Next Chapter