QED example (the user input is underlined):
Display on terminal Comments
QED Invoke QED
QED 4.3
uA Start appending
APP >THIS IS A SYMBOLIC FILE,
APP >CEATED USING QED.
APP >* (CTRL)+L (CR) typed
*L1,$ List whole buffer
($=last line)
1 >THIS IS A SYMBOLIC FILE,
2 >CEATED USING QED. ...error
*S:L/CREA/CEA/ Substitute and list
2 >CREATED BY QED. ...correct
1 SUBSTITUTION
*W"QED-DEMO" Create file and write
the QED buffer into it
21 WORDS WRITTEN
*EX Exit
@Q QED-DEMO Invoke QED and read file
into QED buffer
QED 4.3
21 WORDS READ
*E2,L Edit line 2 and list
2 >CREATED USING QED.
EDIT>CREATED> AND EDITED USING QED.
* |_____|||__________||_________|
| | | |_________ CTRL+D copy rest of line
| | | and terminate
| | |________________ type new text
| |______________________ CTRL+E enter insert mode
|_____________________________ CTRL+Z D
copy line including D
* 1,$
1 >THIS IS A SYMBOLIC FILE,
2 >CREATED AND EDITED USING QED.
*W* write back to default file
(*=default file)
27 WORDS WRITTEN
*EX
QED commands (in the examples, the * is the QED prompt) :
Function Example Explanation
Append *A. Append after the current line
Terminate with (CTRL)+L !
Insert *I9 Insert before line 9
Terminate with (CTRL)+L !
Change *C.-1 Change previous line
Terminate with (CTRL)+L !
(.=current line)
Delete *D2,26 Delete lines 2 to 26
Edit *E$,L Enter edit mode at the last
line (edit characters -
see below !)
List *L1,$ List the whole file on the
terminal
Next *N9 List 9 lines following the
current
Previous *P List the previous line
Value *V List the line number of the
current line
Read *R SC-1 Read file SC-1 into the QED
buffer
Write *W* Write the QED buffer back to
the default file
Substitute *S:l/NEW STRING/OLD STRING/.,.
Substitute "OLD STRING" with
"NEW STRING" on the current line
Exit *EX Exit from QED
Mode *ML(1) Turn on line numbering
Tabs *T8,73 Set tabs
Examine *X Examine the default file name
Some QED edit characters:
Character Function
(CTRL)+A Backspace one character (types )
(CTRL)+C Copy one character from old line
(CTRL)+D Copy rest of old line and terminate edit
(CTRL)+E Start/stop inserting from terminal (types <>)
(CTRL)+G skip next "word" (types %%%%)
(CTRL)+H Copy rest of old line
(CTRL)+L Terminate edit
(CTRL)+M Terminate edit (CR)
(CTRL)+N Copy next "word"
(CTRL)+O Copy old line up to but not
including character x
(CTRL)+Px Skip characters in old line up to but
not including character x.(types %%%%)
(CTRL)+Q Restart the edit (types _)
(CTRL)+R Retype line
(CTRL)+S Skip one character in old line (types %)
(CTRL)+U Copy up to next tabulation stop
(CTRL)+V Allows any edit character or control
character to be accepted as normal
characters (&x in listing, x=character)
(CTRL)+W Backspace one "word" (types \)
(CTRL)+Xx Skip characters in old line up to and
including the character x (types %%%%)
(CTRL)+Z Copy old line up to and including
character x
Short Commands: (given in HOME position, following the prompt "*")
W Write to an output file or device. Giving only a RETURN the current default filename, normally the original input file, is displayed and may be edited on the command line. Optional parameters are available with the down-arrow key: <from line number>,<to line number>. The defaults for these parameters are the boundaries of the marked area if one exist (see the function key MARK, FUNC+CTRL-V or CTRL-V)
A Append the content of the work area to the specified file
N Display next window
DOWN ARROW -- " --
P Display previous window
UP ARROW -- " --
L Display last window
$ -- " --
RIGHT ARROW Shift the window by 40 columns to the right
LEFT ARROW Shift the window by 40 columns to the left
M Move the first line of the display to specified line
B Set borders for text area
Q Sort the text area specified according to the key columns marked with the MARK function (ND-500 version only) Parameter format: <1st line>.<first col>:<last line>.<last col> eg. Q 30:$ will sort the whole lines from line 30 to the end or Q 1.10:29.40 will sort the columns 10 to 40 in the first 29 lines
T Set tabulator stops. RETURN only displays the current setting
X Display the current default file name
V Calculator: simple arithmetic experessions can be evaluated in the HOME position, the result is displayed in decimal, octal, hexadecimal and the ASCII equivalent on the status line.
CTR-V Set cursor trace on / off (toggle switch). In ON position the line and column and the hexadecimal value of the character at the current cursor position are displayed.
I Insert a number of lines before the specified line. Parameters: <position of first line>,<position of last line>, <position before which the specified text shall be inserted> Additional prompt: Delete the moved lines at its original place YES/NO.
S Substitute a specified text string with a new one.
Parameters: <string to be replaced> after additional prompt: <new string>
Manual check: Y the cursor stops at every match, only the entry "S" will initiate the replacement, otherwise the original text is not altered at this point. To abort the substitute function press the HOME key. Manual check: N all characterstrings which match are replaced by the new string, the number of replacements done is shown on the command line.
D Delete a set of lines. Parameters: <first line>,<last line>
E Exit from PED to SINTRAN. The command CONTINUE from SINTRAN continues PED at that point where it was left.
@ Enter SINTRAN command mode. Any SINTRAN command may be used. Warning: if other than LIST-FILE, FILE-STAT, WHO etc. commands are used the content of the PED working area may be lost.
! Change the terminal type by specifying another number. The terminal will be re-initialised to the new type.
RETURN Go from command mode to 1st position of displayed text window.
HOME change between command mode and in-line editing. The last cursor position before entering command mode is resumed if the same window is still displayed. This command is also used to abort the execution of any other PED command.
Control commands (mainly for in-line editing):
<...> means press CTRL and the specified key simultaneously.
Cursor positioning: (cursor is not in HOME position)
ARROWS Move cursor into the specified direction. Keeping the ARROW key pressed the cursor will continue moving into that direction.
LEFT ARROW: limit is the 1st column of that line
RIGHT ARROW: limit is column 256, the display window will change accordingly
UP ARROW: limit is the 1st line of the text. If the cursor would move out of the screen the whole display is scrolled downwards by 10 lines.
DOWN ARROW: no limit. If the cursor would move out of the screen the whole display is scrolled upwards by 10 lines
<T> Move left to the next TAB stop.
<I> -- " --
<U> Move left to the previous TAB stop.
<Y> -- " --
<F>x Move right to the 1st position where character "x" occurs. If this character does not exist don't move at all.
<R>x Move left to the 1st position where character "x" occurs. If this character does not exist don't move at all.
<V> Display current cursor position, the hexadecimal value of the character in that position and the overall length of the current line. Additionally a marker is set. A block may be defined by marking the beginning and the end with <V> (watch the display on the command line saying FROM: or TO:). These positions are saved and may be used as default values for the INSERT / DELETE command.
<G> Continue searching for the string as specified in the G command.
<B> Insert mode on/off. Each RETURN shifts all fallowing text downwards by one line. (also valid in command mode, but no effect on the command line)
<A> Delete character at current cursor position. All characters to the right are shifted by one position to the left.
<D>x Delete all character up to and including character "x". If RETURN is specified as "x", the rest of the line is deleted. If another <D> is specified as "x", the complete line is deleted and may be restored at any place with <Q> as often as no other <D><D> is given.
<C> Copy 1 character from the previous line.
<N> Copy 1 character from the next line.
<P>x Copy all characters up to and including "x" from the previous line (TANDBERG only)
<<->> <P>x Copy all characters up to and including "x" from the following line. <<->> denotes CTRL,SHIFT and UNDERLINE pressed simultaneously. (TANDBERG only)
<L> Insert blank line before current cursor position, the cursor is repositioned to the beginning of the new line.
<W> Restore last deleted line before the current line. (see <D>)
<<C>> Copy the marked area to the current cursor position.
<<D>> Delete the marked area.
<<M>> Move the marked area to the current cursor position and delete the original.
PED allows the simultaneous working in different work areas. They can be specified either in MENU 1 by typing 1 in the HOME position or by reading a file and specifying via DOWN ARROW a different work area. Non existing workareas are created by enclosing the name in "". The change between the work areas is done with the HOME command M.
Example: R FILE (press DOWN ARROW) Insert before:"WORK2" will create a second work area with name WORK2. The HOME command PED:M WORK2.100 will change to this work area and move to line 100. Up to 3 work areas may be displayed simultaneously on the screen, either horizontally or vertically separated by a solid line. Areas marked with the MARK function <<CTR-V>> maybe transferred between different work areas.
Tell me more about this cookbook
Meet the editor, Tony
Meet Bjorge who's responsible for this page