[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 INed Editor User's Guide

Chapter 2. Starting and Ending an Editing Session

The INed editor stores information (programs, memos, and other text documents) as files. Working with a file or directory is called an editing session. You can start an editing session either by creating a new file or by accessing an existing file or directory.

When you want to type new information such as a letter, memo, or program, you must create a file. The INed editor can edit two types of files: text and structured. Text files contain only sequences of characters. Structured files store specialized data and contain a history, which you can use to recover past versions of the file. Structured files may become quite large after several changes. You can use commands such as the ghost command, newfile command, and rmhist command to work with structured files.

While you are editing the file, you can save changes without ending the editing session. You can also make a copy of the file you are editing by saving it in a different file, or, using the Print menu, print the file or append it to another file. When you end the session, you store the file. You can either store the file with your new changes or store the original file with no changes.

Note: Start the INed editor to perform any INed functions.

Editor Screen

The top of the editor screen shows you the left and right margins and the tab stops. The bottom of the screen gives you the following information:

File Manager Screen

The AIX file system is an arrangement of directories and files. The top of the file system is a directory called the root directory. The root directory is indicated by the / (slash) symbol. At the next level are several directories. One of the directories at the second level is the u directory. It can contain the home directories of users in the system. Which directory contains the home directories depends on how the system is configured.

See the figure AIX File System, which shows a portion of a simple AIX file system. In this diagram, file names are italic and directory names are bold.

The editor displays the full path name of the current file at the bottom of the File Manager screen. Each level in the directory is indicated by a / (slash) symbol. For example, if you are editing chapt1 in the illustration, the full path name is /u/lisa/book/chapt1 . When you access the File Manager screen, each file in the current directory displays on the screen. You can type in descriptions for each file. The File Manager does not automatically create descriptions. You can use the File Manager screen and the command keys to manipulate files and directories.

For information on the procedures, refer to the following:

How to Start an Editing Session with the INed Editor

Prerequisite Tasks

To Access the Editor Screen

The lowercase e begins the INed editor.

To Access the File Manager at the Current Directory

To Access the File Manager at Your Home Directory

How to Create a File with the INed Editor

To Create a File

How to Access an Existing File with the INed Editor

Prerequisite Tasks

To Access a File from the File Manager Screen

To Access the Last File Edited

Enter the following:

e

The INed editor displays the part of the file where the cursor was located when the file was last stored. This works only if you exited without pressing the F12 key (the Zoom Out function) first. Otherwise, you get the File Manager window with the cursor on the file name it was on when you last exited.

To Access a Specific File

Enter the following:

e File

where File is the name of a file you want to edit.

To Access a Specific File at a Specific Location

Enter the following:

e File LineNumber ColumnNumber

where File is the name of a file you want to edit, LineNumber is the line number you want to be the current line, and ColumnNumber is the column where you want the cursor.

The file is displayed with the cursor located where specified.

For example, to go to line 55 of the NYexpenses file, enter:

e NYexpenses 55

To go to the same line of the same file but start in column 25, enter:

e NYexpenses 55 25

To Access a Specific File at a Pattern after a Specific Location

Enter the following:

e File LineNumber ColumnNumber Pattern

where File is the name of a file you want to edit, LineNumber is the line number where you want to start searching, ColumnNumber is the column where you want to start searching, and Pattern is a character string or regular expression representing the text for which you want to search.

The file is displayed with the cursor located where Pattern is located.

For example, to go to the NYexpenses file, search from the first character of the file, and begin editing at the first occurrence of the string dinner , enter:

e NYexpenses 0 0 dinner

How to End an Editing Session with the INed Editor

To Save File Changes, Store Updated Files, and Exit

Press the Ctrl-A, D key sequence (the Exit function).

Usually when you create or revise files, you want to store the latest versions.

The editor stores the files and returns to the system prompt.

After the files are stored, the editing session ends, and the previous screen is displayed. (If you entered the editor from the system prompt, the system prompt is displayed.)

The next time you use the files, you will see the updated versions, exactly as you stored them.

If no changes were made to the files, the files are not stored.

Note: To save space when storing a text file, the editor may replace multiple blanks at the beginning of lines with tab characters. Some programs cannot process files that contain tab characters. Before you use these programs with INed editor text files, you should run the untab command.

To Ignore Editing Changes, Restore Original Files, and Exit

Sometimes when you create or revise a file, you may want to start over and not store anything you just typed.

To Cancel the Editor if No Other Method Works

Press the Ctrl-\ key sequence (the Quit function).

The editor attempts to save all files and returns to the system prompt.

Related Information

INed Editor Overview introduces general concepts about the INed editor, lists the INed editing functions and describes the system guidelines for using the INed editor.

The e command, ghost command, newfile command, rmhist command, untab command in AIX Version 4.3 Commands Reference.

INed Editor Functions for the Standard Keyboard is a table that shows the INed editor command keys on a standard keyboard.

INed Editor Files in AIX Version 4.3 Files Reference contains reference information about the files used by the INed editor.


[ Previous | Next | Contents | Glossary | Home | Search ]