Chapter D 4 : Using the Full-Screen Editor

The Advanced Revelation full-screen Editor is used to create, display, modify, and delete Revelation records and operating system formatted files. The chapter presents its features and explains how to use it effectively.

Use Advanced Revelation’s full-screen Editor to enter or edit records in Revelation files. For example, you can use the Editor to edit R/BASIC source code records. You can also use Advanced Revelation’s Editor to enter or edit operating system formatted files.

You use the same keys to enter and edit data in the full-screen Editor that you use in win- dows. For example, the same keys are used to move the cursor, enter or delete characters, enter or delete lines, etc. For details on the editing keys, see the “Entering and Editing Data in Windows” chapter.

To start the full-screen Editor, choose Edit from the Developer Tools menu or type EDIT at The Command Level (TCL) window.

The Edit command window appears:

Edit 

File name 

Record(s) 

Enter the name of the file that contains records you want to edit, or the name of the file where new records you create will be written. The file name you enter must refer to an existing file. To choose from a list of attached files, press [F2] (Options).

Enter the name of the records to edit or create. To edit more than one record, enter the name of each record on a new line. To edit all the records in the file, enter * (asterisk). To choose from a list of available records, press [F2] (Options). The maximum size of a record you can edit in the full-screen Editor is 65,536 characters.

When you have entered the file name and record names you want, press [F9] to display the full-screen Editor.

You can also start the Editor by using the EDIT command at TCL. This is the general format for the EDIT command:

EDIT {DICT} filename record.key(s) 

For more information on the EDIT command, see the “TCL Command Reference” chapter in the TCL section.

You can determine these environmental features of the Editor:

  • Case insensitivity in searches
  • Tab stops
  • Automatic wrapping of long text lines
  • Automatic indents for new lines
  • Automatic new line insertion when [Enter] is pressed
  • Use the cursor position and editor status that was active when the record was last saved or use the system defaults defined at the Editor window
  • Preserve or clear existing data at a prompt when you begin typing

Default settings for these features are specified at the Editor Environment window. Use the Management-Environment-Editor option on the Main menu to access the Editor Environment window and change the defaults.

You can temporarily override some Editor environment defaults and specify new settings for the current session. To do so, use one of the softkeys listed below:

When you want to:Press this key:
Change tab stops[Ctrl-T]
Use the Auto Line Modes popup to:
Change auto word wrap
Change auto line indent
Change auto line insert
[Ctrl-W]

When you press [Ctrl-T], the current tab stops appear at the top of the screen. Each bar (!) marks the location of a tab. The cursor rests at the beginning of the line of displayed tabs. To set or remove a tab without disturbing the current position of other defined tabs, the Editor should be in overwrite mode. (If Ed Ins displays on the status line, press [Ins].) With the Editor in overwrite mode:

  • To remove a tab, use the arrow keys to move the cursor to the tab you want to remove and press [Spacebar].
  • To create a new tab, use the arrow keys to move the cursor to the location you want and press [|] (a shifted backslash).

When you are finished setting the tabs, press [Enter] or [F9] to save the changes and return to your record. To return to the record without saving your changes, press [Esc].

Depending on the type of record you are editing, automatic environment features can simplify your editing task and minimize your keystrokes. These features operate when editing entry lines in windows and when using the full-screen Editor.

You can press (Ctrl-W] to temporarily change automatic environment features of the Editor. The following popup appears:

Auto Line Modes 
  

Mode On/Off 
1) Insert Mode On 
2| Wrap line On 
3 Insert Mode On 

  4   Indent line On 
5 Ignore case   On    

Highlight the feature you want to change and press [Enter]. The [Enter] key toggles the feature on and off. When the settings are the way you want them, press [F9] to save the settings and return to the record.

  • Insert mode: If Insert mode is on, any text that you enter is inserted into existing text. If Insert mode is off, any text that you enter overwrites existing text.
  • Wrap line: If Wrap line is on and you type all the way to the right border of the screen, the cursor automatically moves to the beginning of the next line. If Wrap line is off, the cursor remains on the current line, and text scrolls off the left side of the screen.
  • Insert line: If Insert line is on and you press [Enter], a blank line is inserted and the following lines move down one. If Insert line is off, the cursor moves to the first column of the next line, and no blank line appears.
  • Indent line: If Indent line is on, each new line is indented as far as the previous line. If Indent line is off, each new line begins at the left border regardless of the indent of the previous line.
  • Ignore case: If Ignore case is on and you search for a string of characters, the system finds the next occurence of the string regardless of capitalization (case). If Ignore case is off, the system finds only occurences that match exactly, including capitalization.|

For more information on searching for text, see “Searching and Replacing” below.

For example, to write new notes in a text field, you would probably use these settings:

  • Auto word wrap ON
  • Auto line indent OFF
  • Auto line insert ON

To write an outline of a proposal in the full-screen Editor, you might use the same settings except with auto line indent on, to save manually spacing and tabbing to each subheading in your outline.

To write or edit lines of program code in the full-screen Editor, you would probably use these settings:

  • Auto word wrap OFF
  • Auto line indent ON
  • Auto line insert ON

To call and edit an operating system file in the full-screen Editor, use the EDIT command at TCL with the DOS option:

EDIT DOS pathname\osfilename 

For example, to edit an operating system file named MYNOTES.DOC in a directory named DOCUMENTS, enter this command at TCL:

EDIT DOS C:\DOCUMENTS\MYNOTES .DOC . 

Advanced Revelation starts the full-screen Editor and displays the file in the Editor window.

When an operating system file first appears in the full-screen Editor, carriage returns and line feeds are displayed as ASCII graphics characters. For ease of editing, you can use the Softkey [Shift-F7] to edit the file in the operating system format. For details, see “Editing Operating System Files” later in this chapter.

To leave the Editor, press [Esc]. If you have made changes to the current record since writing the record to the file, Advanced Revelation asks you to confirm that you do not want your changes saved. To discard your changes and leave the Editor, press [Esc] again. To write your changes to the file, press [F9].

To undo edits you have made to a record and start again with the most recent data saved to the file, press [Ctrl-Q]. Before undoing your edits, Advanced Revelation asks you for confirmation. To undo the edits, press [Ctrl-Q] again. To cancel the undo action, press any other key.

You can define a block of text and copy it once or many times at any cursor position. In addition, by using the Special Modes popup, you can move a defined block to another location in the record or delete it entirely.

To define a block of text, follow these steps:

  1. Move the cursor to the first line of the block and press [Ctrl-B].
  2. Use the down arrow key to move the cursor to the block’s last line.
  3. Press [Ctrl-B] to mark the last line of the defined block. The entire block is defined with a highlight.

Advanced Revelation provides five buffers, numbered Bufferl through Bufferd, where defined blocks of text can be stored for later use. You can think of a buffer as a clipboard that holds a segment of a field or record. Because you have five buffers to work with, you can hold up to five different blocks at one time. Buffers are system-wide and stay active between processes. For example, you can store a block of text from one record in a buffer for use later in another record. The buffers are cleared when you exit Advanced Revelation.

Use these keys to work with defined blocks of text:

When you want to:Press this key:
Mark the beginning and ending of a text block[Ctrl-B]
Cut the current defined block to a buffer[Ctrl-F3]
Paste the current block from the buffer to the cursor position[Ctrl-F4]
Clear the current block definition][Ctrl-U]
Reformat the current block[Ctrl-Z]
Use a Special Modes popup to:
Edit the buffer
Move the block to cursor position
Delete the block
[Ctrl-S]

To cut a defined block to a buffer, press the Cut key [Ctrl-F3]. A message tells you that the block has been cut to the current buffer.

The block that is stored in the buffer can be pasted into any record displayed in the full-screen Editor or at a prompt in a window. To paste the defined block, position the cursor where the stored text should be inserted and press [Ctrl-F4]. The text is pasted where you want it. The text that was cut to the buffer remains available and can be pasted more than once.

Use the Special Modes popup to see and edit the buffers. First, press [Ctr]-S] to display the popup:

Special Modes 

1 Hove block 
2| Delete block 
3| Clear text 

    4| Edit buffer 
S| Ascii table     

Choose the Edit Buffer option to display the Cut and Paste window.

SSS Lut and Paste, 

Current buffer # 1 

Buffert Authorized training center 

Buffer2 

Buffer3 

Buffer4 

  Buffers 

A flashing cursor rests on the current buffer number. When you cut or paste a block of text, Advanced Revelation always uses the current buffer.

To change the current buffer, enter the new buffer number at the Current buffer # prompt. Press [F9] to save the window.

To edit the contents of any buffer, follow these steps:

  1. Press [Ctrl-S] to display the Special Modes popup. Choose Edit buffer.
  2. Move the flashing cursor to the appropriate buffer and edit it as you would any entry line.
  3. Press [F9] to save your changes and return to your record.

To move a block of text from its current location, follow these steps:

  1. Define the block of text you want to move.
  2. Place the cursor at the first line of the block’s new position.
  3. Press [Ctrl-S] to display the Special Modes popup.
  4. Choose Move block.

Advanced Revelation moves the block to the location you want.

To delete a block of text, follow these steps:

  1. Define the block of text you want to delete.
  2. Press [Ctrl-S] to display the Special Modes popup. Choose Delete block.

The Editor deletes the block.

You can reformat a block of text using [Ctrl-Z] (Reformat) while editing.

Warning! Ifyou press [Ctrl-Z] without marking a block of text first, the entire contents of the window will b« reformatted.

To reformat a block of text, mark the block using [Ctrl-B].

Once the block is marked, press [Ctrl-Z]. A message will appear asking you to repeat the keystroke in order to confirm that you wish to reformat. Press [Ctrl-Z] again.

The text in the marked block will be reformatted to fit into the current window width. If you wish the text to be narrower or wider than the current window width, use [Ctrl-F7] (Resize) before reformatting to make the window the appropriate width.

When you are finished with a defined block, press [Ctrl-U] to clear the block definition from the screen.

You can search for a specific string of text and find every instance of the use of the string in the record, or you can search for a string of text and replace it with a different string.

You can choose to have all string searches case sensitive. This means that in order for a character string to match the one you enter, it must appear in exactly the same upper/lower case letter combination. Thus, if you enter “PERSONNEL”, the text search will not locate the word “Personnel”.

You can specify that string searches be case insensitive. When you specify case insensitivity, searches will find all upper/lower case letter combinations of the search string. For example, if you enter “PERSONNEL”, the text search will find “Personnel”, “personnel”, “PERSONNEL”, ete.

Case insensitivity is turned on and off at the Case insensitive search (Y/N) prompt in the Editor Environment window. Choose Management-Environment-Editor from the Advanced Revelation Main menu to access the Editor Environment window. Enter Y (yes) at the Case insensitive search (Y/N) prompt to turn on case insensitivity.

Use these keys to search and replace:

When you want to:Press this key:
Find a string of text[Ctrl-F]
Repeat the previous Find action[Ctrl-A]
Find and replace a string of text[Ctrl-R]

To find a string of text, press [Ctrl-F]. A prompt at the bottom of the screen asks for the text you want to find. Enter the text at the prompt.

To replace a string of text, press [Ctrl-R]. Prompts at the bottom of the Edit win- dow ask for the text you want to find and for the replacement text. Enter the text you want to find and replace.

Your environment determines whether or not the search is case insensitive. However, the replacement text is used exactly as entered. For example, in a case insensitive search and replace operation, a search for “personnel” might find the words “PERSONNEL” and “personnel”. If you specify “workers” as the replacement text, the word “PERSONNEL?” will be changed to “workers”.

To display and edit multiple values, sub-values, or text lines, each on its own line, move the cursor to the line that contains the values you want to edit and press [Ctrl-E]. After making your changes, press [F9] and then [Esc] to return back to the record.

When the full-screen Editor displays a record, each field appears on its own line. Multiple values, sub-values, or lines in a text field are separated by these markers:

Type of Value:Marker:
Multiple values in a multivalue fieldASCII 253
Sub-valuesASCII 252
Text linesASCH 251

Fields that contain multiple values or sub-values can be difficult to read and edit when all the values appear on one line. To display and edit multiple values in a multivalue field each on its own line, move the cursor to the line and press [Ctr]-E]. The Field window appears with the multiple values displayed separately.

You can edit the values as you would any multivalue prompt. To save your changes, press [F9]. To return to the full-screen Editor, press [Esc].

Sub-values in a multivalue field appear separated by an ASCII character 252. To display and edit sub-values each on its own line, follow these steps:

  1. Move the cursor to the line containing the sub-values you want to edit.
  2. Press (Ctrl-E] twice. The Value window appears, displaying each sub-value on its own line.
  3. Edit the sub-values as you wish.
  4. To return to the full-screen Editor, press [F9] to save your changes and [Esc] to return to the previous window. To retain your changes, press [F9] again at the Field window before returning to the full-screen Editor.

Advanced Revelation uses text marks (ASCII 251) as delimiters to maintain the for- mat of formatted text fields. When a text field is displayed on the full-screen Editor, the markers Advanced Revelation uses to format the text are displayed.

To display the field formatted in the same way it would be displayed in a window, press [Ctrl-E] three times. Edit the field as you wish. To save your changes, press [F9]. To retain your changes and return to the full-screen Editor, you must press {F9] and [Esc] at each window until the full-screen Editor appears.

Each time you press [Ctrl-E], Advanced Revelation further subdivides the current value and displays the subdivision in a new window. Edit the value in the window as you wish. To retain your changes, you must press [F9] at each window as you return through the Value windows to the full-screen Editor.

The following table shows the Softkeys defined for the full-screen Editor. You can execute softkeys directly by pressing the appropriate keys or indirectly by choosing options from the Softkey popup. To use the Softkey popup, press [F6].

When you want to:Use this Softkey:
Edit a different record[Shift-F1]
Edit an $INSERT record at the current cursor position[Shift-F2]
Check record size[Shift-F3]
Shift a block’s indentation[Shift-F4]
Convert defined block to upper case[Shift-F5]
Convert defined block to lower case[Shift-F6]
Edit a record in DOS format[Shift-F7]
Convert a record to DOS or Advanced Revelation format[Shift-F8]
Save and compile a record[Shift-F9]

To display and edit records other than those in your current browse list, use one of these methods:

  • To display any record, press the Softkey [Shift-F1]. A window appears in which you enter the name of the file and the record you want to edit.
  • To display additional records contained in your current file, press [Alt-I] and add the record keys to your browse list.

For example, suppose you have a file named SOURCE_BP that contains R/BASIC programs. While writing a new program, you realize that with a little revising you can use a block from another program as a block in your current file.

First, you press [Shift-F1] and enter SOURCE_BP as the file to edit. Then you enter the name(s) of the record or records that contain the blocks you want. Press [F9] and Advanced Revelation displays the first record in the Editor window.

You define in a block the lines you want to use in your original file and cut them to the buffer. To return to your original records, press [Esc].

An $INSERT statement directs the compiler to insert R/BASIC source code from another record into the current record. For more information on using $INSERT statements, see the “Programming with R/BASIC” chapter in the R/ BASIC section.

To edit the record named in an $INSERT statement, move the cursor to the line containing the $INSERT statement and press [Shift-F2]. Advanced Revelation displays the record so that you can edit it. When you are finished editing the record, press [F9] to save your changes and [Esc] to return to your original record.

The maximum size of source code that can be compiled is approximately 34,000 bytes. To check the size of your current record, press [Shift-F3]. Advanced Revelation displays the current record size.

To shift a group of lines so that they start at a new column position, follow these steps:

  1. Define the block of lines.
  2. Move the cursor to the column where you want the block to start.
  3. Press [Shift-F4].

The block shifts to the new indentation.

In some situations, you may want to convert a block of text to all upper case or all lower case. For example, when writing program code, you can write all your code and comments in upper case, then convert the comments to lower case so they are easier to find and read.

Or, when the Find action is case sensitive, you may want to convert a block of text to all one case when you are searching for a specific string of characters in the block. For more information on the Find action, see “Searching and Replacing” earlier in this chapter.

To convert a block of text to all upper case, first define the block and then press the Softkey [Shift-F5].

To convert a block to all lower case, define the block and then press the Softkey [Shift-F6].

When you create and edit Revelation records, Advanced Revelation places special markers between fields, values, and sub-values. In the full-screen Editor, each field appears on a single line. When you save the record, the lines are written to the record as individual fields.

In contrast, operating system files have carriage returns and line feeds between the lines of text. By default, Advanced Revelation displays carriage returns and line feeds in the full-screen Editor as ASCII graphics characters.

To edit an operating system file, use the softkey [Shift-F7]. Advanced Revelation displays the file so you can edit it.

When Advanced Revelation converts an operating system file to Advanced Revelation format, the carriage returns and line feeds in the file are replaced by Advanced Revelation field markers. In the same way, when Advanced Revelation converts an Advanced Revelation formatted file to operating system format, the field markers are replaced by carriage returns and line feeds.

  • Use DOS format to edit material that will be written to an operating system file and not to an Advanced Revelation or bonded file. For example, your AUTOEXEC.BAT file should be edited in DOS format.
  • Use Advanced Revelation format to edit material that will be written to an Advanced Revelation or bonded file.

To convert a file’s format, press the Softkey [Shift-F8]. Use this key as a toggle to switch from operating system format to Advanced Revelation format and back again.

To save a record, press [F9]. To save and compile a program source record, press the Softkey [Shift-F9].

When you press [Shift-F9], Advanced Revelation saves the current record and immediately starts the R/BASIC compiler to compile the record. For more information on the compiler, see the “Programming with R/BASIC” chapter in the R/ BASIC section.

If the compile is unsuccessful, Advanced Revelation returns you to the Editor with the cursor on the first line that contains an error. The Status Lines display the error message.

The Keystroke Translator displays your typed keystrokes in the format Advanced Revelation uses to create a set of captured keystrokes. For example, when you press [ T ] with the translator on, instead of moving the cursor up one line Advanced Revelation displays the following:

{UP } 

To toggle the translator on and off, press [Ctrl - —].

To display a table of the ASCII character codes, follow these steps:

  • Press [Ctrl-S] to display the Special Modes popup.
  • Choose Option 5 ASCII table.

Advanced Revelation displays the table. To return to your record, press [Esc].

  • arev/chapter_d_4.txt
  • Last modified: 2023/12/01 09:34
  • (external edit)