Quick EDitor (QED) - Documentation

[Copyright 1999,2002 Frank Durda IV, All Rights Reserved.
Mirroring of any material on this site in any form is expressly prohibited.
The official web site for this material is:  http://nemesis.lonestar.org
Contact this address for use clearances: clearance at nemesis.lonestar.org
Comments and queries to this address: web_software_2011 at nemesis.lonestar.org]

Using QED

QED is a very simple editor to use. When you start QED, a description of all commands and the current status of the editor is always displayed at the bottom of the screen.

The following text file will be used in showing how the various commands work.


1  This is a sample file which contains several lines of text.
2  To edit a line, move the cursor to that line using the up and down
3  arrow keys, then use the left and right arrow keys to move to where
4  you wish to replace, insert or delete text.  To replace existing text or
5  add text to the end of an existing line, simply type the text.
6  To delete characters, position the cursor and use the <F2> key.
7  To insert characters, move the cursor to the desired position, press <F1>
8  and type the new text.  You can exit Insert mode by moving to another line
9  or by pressing <Break>.
10 To undo changes made on the current line, press <F3>.

QED is started by typing its name, followed by the file to be edited. If you don't specify a file name, QED will default to the file name NONAME/SRC, and if that file exists, it will be opened and loaded into the editor.

Sample session

For example, once the above file is loaded, you would see something like this:

1 This is a sample file which contains several lines of text.
2 To edit a line, move the cursor to that line using the up and down
3 arrow keys, then use the left and right arrow keys to move to where
4 you wish to replace, insert or delete text. To replace existing text or
5 add text to the end of an existing line, simply type the text.
6 To delete characters, position the cursor and use the <F2> key.
7 To insert characters, move the cursor to the desired position, press <F1>
8 and type the new text. You can exit Insert mode by moving to another line
9 or by pressing <Break>.
10 To undo changes made on the current line, press <F3>.







|_______|1______|__2____|____3__|______4|_______|5______|__6____|____7__|______8
<F1>  Insert Text Here    <F2>  Delete Text Here    <F3>  Undo Changes Here     
  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]     [9]     [-]   
                  Insert  Mark   Delete   Move    Copy    Save    Exit  Toggle  
                  Lines   Lines   Lines   Lines   Lines On Disk  Editor  Help   
File: NONAME/SRC:0                [] Hold <Clear> Down   Copr. 1985,1999 fdiv   
Ready                           Line     1  [QED Version 1(4) 14-Feb-1999 fdiv] 

In this example, the character in bold in the upper left corner shows where the cursor is (on line 1).


The QED Commands

QED has a very simple set of commands, most of which use the [CLEAR] key and a number, or one of the three [Fn] keys on the right side of the keyboard. Here is a summary of the commands.

[F1] Places the editor in Insert mode. once pressed, any characters typed are inserted at the cursors current location. To exit Insert mode, press [Break].
[F2] Deletes a character at the cursors position.
[F3] Undoes any changes that have been made on the current line. Once you move to a different line using the up or down arrow keys or the Enter key, the changes to a given line become permanent.
[Break] Stops whatever is happening. Exits Insert lines, Insert characters and Marking modes. Once a copy, move or delete starts, you can't stop these operations. If you made a big mistake, consider exiting without saving and re-entering your latest changes.
[Clear][3] Opens a blank line and places the Editor in Insert mode. By entering text and pressing [Enter] at the end of each line, any number of new lines can be inserted. To exit this mode, press [Break].
[Clear][4] Places the editor in Marking mode and allows you to select one or more lines for deletion, copying or moving. Pressing [Break] or [Clear][4] a second time exits this mode.
[Clear][5] Deletes the line that the cursor is currently positioned at. If multiple lines are marked (highlighted), then all of these lines will be deleted.
[Clear][6] Moves the lines that are currently marked (highlighted). This command must be issued twice. The first [Clear][6] command ends Marking mode and the second [Clear][6] indicates that the cursor is pointing at the location where the lines are to be placed. Pressing [Break] prior to the second [Clear][6] command aborts the move operation.
[Clear][7] Copies the lines that are currently marked (highlighted). This command must be issued twice. The first [Clear][7] command ends Marking mode and the second [Clear][7] indicates that the cursor is pointing at the location where the copied lines are to be placed. Pressing [Break] prior to the second [Clear][7] command aborts the copy operation.
[Clear][8] Saves the file you are editing on disk without exiting the editor. This command should be issued occasionally, to avoid losing too much work in the event of a power failure or other problem.
[Clear][9] Exits the editor. If any changes have been made to the file being edited, you will be prompted as to whether you wish to save those changes to disk. If the file hasn't been changed, QED simply exits.
[Clear][-] This command adds or removes the menu from the bottom of the screen, allowing all 24 lines of the screen to be used for editing. The menu may be enabled or removed at any time, except while marking, copying or moving text.



Command Examples

If we wanted to copy some lines of text, this is done using a process called marking. In the sample file shown above, we shall move the cursor down to line 6. Once there, press [CLEAR] and the [4] key. This puts the editor in marking mode and that entire line of text where the cursor is located will be shown in reverse video. If the help menu is being displayed, the message at the bottom of the screen will also indicate that you should move the cursor to show what lines you wish to copy, move or delete. All the lines that you select will be shown in reverse video.

In the example below, the cursor is moved from line 6 down to line 9 while in marking mode.

1 This is a sample file which contains several lines of text.
2 To edit a line, move the cursor to that line using the up and down
3 arrow keys, then use the left and right arrow keys to move to where
4 you wish to replace, insert or delete text. To replace existing text or
5 add text to the end of an existing line, simply type the text.
6 To delete characters, position the cursor and use the <F2> key.
7 To insert characters, move the cursor to the desired position, press <F1>
8 and type the new text. You can exit Insert mode by moving to another line
9 or by pressing <Break>.
10 To undo changes made on the current line, press <F3>.







|_______|1______|__2____|____3__|______4|_______|5______|__6____|____7__|______8
<F1>  Insert Text Here    <F2>  Delete Text Here    <F3>  Undo Changes Here     
  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]     [9]     [-]   
                  Insert  Mark   Delete   Move    Copy    Save    Exit  Toggle  
                  Lines   Lines   Lines   Lines   Lines On Disk  Editor  Help   
File: NONAME/SRC:0                [] Hold <Clear> Down   Copr. 1985,1999 fdiv   
Mark Lines to Move/Copy/Delete  Line     9  [QED Version 1(4) 14-Feb-1999 fdiv] 

As an exercise, let's copy lines six through nine and insert them in front of line 2. To do this, we must now issue the Copy command by pressing [CLEAR] and then [7]. The up and down arrows may now be used to move the cursor to the destination of the copy. The marked area will remain marked and won't change size when you move the up and down arrows now. When moving or copying text, the copied or moved lines will be inserted in front of the line you specify, so in this case, the cursor should be moved to line 2.

1 This is a sample file which contains several lines of text.
2 To edit a line, move the cursor to that line using the up and down
3 arrow keys, then use the left and right arrow keys to move to where
4 you wish to replace, insert or delete text. To replace existing text or
5 add text to the end of an existing line, simply type the text.
6 To delete characters, position the cursor and use the <F2> key.
7 To insert characters, move the cursor to the desired position, press <F1>
8 and type the new text. You can exit Insert mode by moving to another line
9 or by pressing <Break>.
10 To undo changes made on the current line, press <F3>.







|_______|1______|__2____|____3__|______4|_______|5______|__6____|____7__|______8
<F1>  Insert Text Here    <F2>  Delete Text Here    <F3>  Undo Changes Here     
  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]     [9]     [-]   
                  Insert  Mark   Delete   Move    Copy    Save    Exit  Toggle  
                  Lines   Lines   Lines   Lines   Lines On Disk  Editor  Help   
File: NONAME/SRC:0                [] Hold <Clear> Down   Copr. 1985,1999 fdiv   
Point Where Text should Go      Line     2  [QED Version 1(4) 14-Feb-1999 fdiv] 

When the cursor is positioned to the desired location, press [CLEAR] and [7] a second time to cause the copy to occur. The file will now look like this:

1 This is a sample file which contains several lines of text.
6 To delete characters, position the cursor and use the <F2> key.
7 To insert characters, move the cursor to the desired position, press <F1>
8 and type the new text. You can exit Insert mode by moving to another line
9 or by pressing <Break>.
2 To edit a line, move the cursor to that line using the up and down
3 arrow keys, then use the left and right arrow keys to move to where
4 you wish to replace, insert or delete text. To replace existing text or
5 add text to the end of an existing line, simply type the text.
6 To delete characters, position the cursor and use the <F2> key.
7 To insert characters, move the cursor to the desired position, press <F1>
8 and type the new text. You can exit Insert mode by moving to another line
9 or by pressing <Break>.
10 To undo changes made on the current line, press <F3>.



|_______|1______|__2____|____3__|______4|_______|5______|__6____|____7__|______8
<F1>  Insert Text Here    <F2>  Delete Text Here    <F3>  Undo Changes Here     
  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]     [9]     [-]   
                  Insert  Mark   Delete   Move    Copy    Save    Exit  Toggle  
                  Lines   Lines   Lines   Lines   Lines On Disk  Editor  Help   
File: NONAME/SRC:0                [] Hold <Clear> Down   Copr. 1985,1999 fdiv   
Ready                           Line     6  [QED Version 1(4) 14-Feb-1999 fdiv] 

Marked regions can also be moved from one place to another, or they can be deleted. In the case of deletion, once you have specified the region to be deleted by pressing [CLEAR] and [4] and then moving the cursor to define the group of lines, just press [CLEAR] and [5].

After a Copy, Move or Delete is completed, the marked region is automatically unmarked. The cursor is left at the bottom of the copied or moved area. If you specified text to be put in front of whatever was on line 2, the cursor will still be pointing at the same line of text after the move or copy has completed. In the above example, what was line 2 is now the sixth line in the file.



Beyond the End

At the end of each file being edited is a line simply known as "End". You may position the cursor here for just about any operation. If you type normal characters, this turns into a real line (with a line number), and a new "End" line appears immediately below it. This concept is important, since it allows you to specify a place after existing text where you can insert new text, or copy or move text from other parts of the file. When the file is saved to disk, the "End" line is not saved, so if you want a blank line to be present at the end of a file you are editing, you must insert one.



The Menu/Status area

Although it takes up some room on the screen, this menu is very helpful and should be left on the screen until you become familiar with all of the commands. The first line indicates standard eight-column tab stops with the "|" symbol, and tens of columns are noted by the numbers.

The next four lines never change and simply list the major commands and what keys are used to activate them. By standard notation, keys marked with <Key> notation are simply pressed to perform the operation. Keys marked with square brackets (like [1]) mean that you must press and hold down the [Clear] key on the keyboard while pressing the specified number or symbol.

The last line of the menu section indicates the current status of QED. Normally the word "Ready" is displayed, but this is replaced by prompts when QED is in other modes. These messages should help you remember what to do next in commands that require multiple steps. In addition, if an error occurs or an illegal operation is attempted, the error message is displayed in this area.

Finally, the current line number for the cursor is shown on the bottom line.

If you have the menu turned off and desire to turn it on, you can do so at almost any time, except while marking, copying or moving text. If the line the cursor is currently on would be obscured by the menu, the screen automatically repositions when the menu is turned on so that the cursor is always visible.



Unimplemented Functions

The [Clear][1] and [Clear][2] commands do not exist in this version of QED. These commands are reserved for string search and string substitution operations. These commands are ignored.



[Copyright 2000,2002 Frank Durda IV, All Rights Reserved.
Mirroring of any material on this site in any form is expressly prohibited.
The official web site for this material is:  http://nemesis.lonestar.org
Contact this address for use clearances: clearance at nemesis.lonestar.org
Comments and queries to this address: web_software_2011 at nemesis.lonestar.org]

Visit the nemesis.lonestar.org home page and index

Valid HTML 4.01!