Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/ftp/documents/system-docs/vms-guide/html/VUG_28.html
Дата изменения: Wed Nov 1 17:38:24 1995
Дата индексирования: Sun Dec 23 18:30:13 2007
Кодировка:

Поисковые слова: вечный календарь
DECTPU



Editing Files

DECTPU


The DEC Text Processing Utility (DECTPU) is a
generic set of editing tools that are accessed through various interfaces and the default editor. There is an EDT interface that looks and acts like the usual EDT editor, but that actually uses DECTPU. The default interface is known as EVE, which stands for Extensible Versatile Editor. EVE has several advantages over EDT. For example, it will save all buffers when you exit, whereas EDT will only save the most-recently active buffer.

EVE is a general-purpose interactive text editor. Its capabilities include:

Starting DECTPU

To use DECTPU with EVE (the default interface) type:

$ EDIT/TPU
EVE will create an empty buffer called MAIN. A buffer is a temporary holding area. There is now a screen containing a reversed-video status line at the bottom that looks like Figure
4.1.



Figure 4.1: EVE Main Buffer

The status line tells you:

The end-of-file marker shows you where the end of EVE's buffer is located. The marker only displays on the screen--it is not written to your file.

You can start typing. When you are finished editing the file, press - and specify a file name for the document.

If you need to revise a previously-created document, you would use EVE's GET FILE command, or you can specify the file name when you first invoke EVE, for example:

$ EDIT/TPU garbage.txt
If you will use EVE as your regular text editor, you may want to create a symbol called EVE that will invoke the EVE interface. You can do this by placing the following command in your LOGIN.COM file:

$ EVE :== EDIT/TPU 
To use DECTPU with an EDT keypad (Figure
4.7 on page 87 shows the EDT keypad), invoke DECTPU as described above. Once you are in the editor, press the key.*1 You will see a Command: prompt below the status line in the command window. At the prompt, type the command:

set keypad EDT
The application keypad will now function like the keypad in EDT.

If you want to use the EDT keypad every time you use EVE, you can place the above command in an initialization file used by EVE when the editor is invoked. The initialization file is called:

SYS$LOGIN:EVE$INIT.EVE

Basic Editing

Once the buffer (shown in Figure 4.1) is displayed, you can move the cursor using the arrow keys. Text is displayed in the buffer as you type.


Press the key to display the Command: prompt in the command box below the status line. If you are using the EDT keypad or a VT100, you can also press .


Saving a File and Exiting

Command: EXIT
or

-

Save a File (and Continue Editing)

Command: WRITE

Exit without Saving (Abandon File)

Command: QUIT

Using the EVE Keypad

Figures 4.2 and 4.3 show the EVE keypad. You can also display the keypad layout by pressing . Table 4.1 lists keystrokes that work with various keyboards.



Figure 4.2: EVE Keys for VT100 Series Terminals



Figure 4.3: EVE Keys for VT200, VT300, and VT400 Series Terminals



Table 4.1: EVE Keyboard Commands

Replacing Text

Command: REPLACE
Old String: Old
New String:New
Replace? Type Yes, No, All, Last, or Quit:
Replace is case
sensitive; some examples of the types of matches and their replacement values are shown in Table 4.2. Note that if you want to find or replace only lowercase occurrences of a string, you could set the matching to EXACT, by using the following command before typing the REPLACE command:

Command: SET FIND CASE EXACT


Table 4.2: Sample Text Replacements

Using Multiple Buffers and Windows

When you begin an EVE editing session, the buffer you are editing is displayed on the screen with its name shown in the reverse-video status line at the bottom of the screen. You can view more than one window on your screen at the same time. For example, you could have two windows on your screen. Your screen would look like Figure 4.4 if you used the commands below (a list of commands for working with split windows is provided in Table 4.3) to split the screen between two windows:

$ EDIT/TPU INFO.TXT
Command: SPLIT WINDOW
Command: NEXT WINDOW
Command: GET FILE MORE_INFO.TXT


Figure 4.4: Split Screen in EVE



Table 4.3: EVE Split Window Commands

Cutting and Pasting Rectangular Text Areas

You can select a boxed area containing columns of text and then cut and paste the box. To do this, follow these steps:

  1. Set the selection method to be box (rectangular region):

    Command: SET BOX SELECT
  1. Move the cursor to the upper left corner of the rectangular box area that will enclose your text:

  2. Begin selecting text by either:

    • Pressing the key, or

    • Command: SELECT

  3. Move the cursor one column past the lower right corner of your boxed area. The selected text will be highlighted.

  4. Cut the selected text using either of the following methods:

    • Pressing the key, or

    • Command: REMOVE

  5. Move to the position where you want to paste the text and move the cursor to the upper left corner of the location for the text.

  6. Paste the contents of the buffer by either:

    • Press the key, or

    • Command: INSERT HERE

Help

You can get extensive online help any time while editing. There are two kinds of help available: keypad help and EVE help.



Figure 4.5: EVE Help

Recovery

DECTPU creates journal files that save your editing commands so that your editing session can be recovered if a system failure occurs. DECTPU provides two journaling methods: keystroke journaling and buffer-change journaling. You can use both methods simultaneously except under DECWindows: only buffer-change journaling can be used with DECWindows.

Keystroke Journaling

DECTPU keeps track of each keystroke that you type in a special file called the journal file, regardless of which buffer is in use. The DECTPU journal file can be identified by its file type, .TJL. If the system is interrupted while you are editing, you can reconstruct your editing session with the /JOURNAL and /RECOVER qualifiers. Here is an example of recovering a file called MEMO.TXT:

$ EDIT/TPU MEMO.TXT /JOURNAL /RECOVER

Buffer-Change Journaling

DECTPU creates a separate journal file for each text buffer. As you edit a buffer, the journal file records the changes you make--such as moving, deleting, inserting, or reformatting text. DECTPU puts the journal files in the directory defined by the logical TPU$JOURNAL; the file has a type .TPU$JOURNAL. You can redefine TPU$JOURNAL to have files written to a different directory, as shown below:

$ CREATE/DIRECTORY [USER.JOURNAL]
$ DEFINE TPU$JOURNAL [USER.JOURNAL]
You may wish to put this definition in your LOGIN.COM file.

Here is an example of how to recover the file MEMO.TXT:

$ EDIT/TPU MEMO.TXT /RECOVER

When you recover files, specify the name of the original file--not the journal file.


Here is an example of how to recover a buffer from a session of editing the file MEMO.TXT:

  1. Start EVE.

$ EDIT/TPU
  1. Type the following command at the EVE prompt:

Command: RECOVER BUFFER MEMO.TXT
Buffer-change journal names come from the name of the buffer or file being edited. If the buffer-change journal with the name of MEMO-TXT.TPU$JOURNAL is available, EVE displays information about the recovery and asks you if you want to recover. Press to recover, or type NO if you do not want to recover.


If you delete, rename, or move the source file, the recover will fail. The source file is that last file written before the system failed, or the file initially read into the buffer.


There are two other ways of recovering buffers that you may find useful:

   Command: RECOVER BUFFER *
   Command: RECOVER BUFFER ALL

Initialization Files

If you have a certain set of commands or defaults that you regularly use when editing files, you can save them in an initialization file that can then be invoked when you start editing a new file. This is especially useful, for example, when you want to define a format for several documents with margins and tab settings. If you want to use an initialization file, you need to specify the file name using a DEFINE statement before running EVE. For example:

$ DEFINE EVE$INIT sys$login:myeve 
$ EDIT/TPU
For more information about DECTPU, see the online help or read the manual Guide to the DEC Text Processing Utility.

Starting DECTPU
Figure 4.1: - EVE Main Buffer
Basic Editing
Saving a File and Exiting
Save a File (and Continue Editing)
Exit without Saving (Abandon File)
Using the EVE Keypad
Figure 4.2: - EVE Keys for VT100 Series Terminals
Figure 4.3: - EVE Keys for VT200, VT300, and VT400 Series Terminals
Table 4.1: - EVE Keyboard Commands
Replacing Text
Table 4.2: - Sample Text Replacements
Using Multiple Buffers and Windows
Figure 4.4: - Split Screen in EVE
Table 4.3: - EVE Split Window Commands
Cutting and Pasting Rectangular Text Areas
Help
Figure 4.5: - EVE Help
Recovery
Keystroke Journaling
Buffer-Change Journaling
Initialization Files

Generated with CERN WebMaker