Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ced(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ed(1)

ex(1)

sed(1)

vi(1)

ced(1)                                                               ced(1)

NAME
     ced - full-screen text editor

SYNOPSIS
     ced [option] [file]

DESCRIPTION
     In a full-screen text editor, unlike a line editor, you can use the
     arrow keys <CURSOR-UP>, <CURSOR-DOWN>, <CURSOR-RIGHT>, <CURSOR-LEFT>,
     <HOME> and <ENTER> to move the cursor anywhere on the screen and can
     then enter or modify text at that position. ced is menu-driven and
     provides you with various editing modes. Depending on the mode you
     select you can:

     -  enter text directly or

     -  enter commands for various editing functions, e.g. copy, delete
        etc.

   Layout of this description

     The description of ced is subdivided into seven sections:

     ⊕  Command overview

     ⊕  Working with ced

        -  The screen

        -  The window

        -  The control panel

        -  Moving the cursor

        -  Selecting the mode

     ⊕  Description of the modes

     ⊕  Error messages

     ⊕  Files

     ⊕  Locale

     ⊕  Environment variables

     The standard version of ced, in which the menu functions and error
     messages appear in English (see LOCALE), is described below.






Page 1                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

OPTIONS
     -f line-number
          ced positions the cursor on the line indicated by line-number.

     -s search-string
          ced positions the cursor on the first line containing search-
          string. If search-string is not present in the file, ced displays
          the start of the file and positions the cursor on the first line.

     file Name of the file you want to edit. If there is no file with this
          name in the working directory, ced creates a new file.

          file not specified:

          ced opens the file which you were last editing with ced on your
          terminal and positions the cursor at the position it last occu-
          pied. It retrieves this information from the file
          /var/ced/CEttyname.loginname.

          If you have never opened a document with ced on your terminal
          before, ced will issue an error message and exit.

          Note:

          If the size of file grows beyond the user file size limit in the
          course of a ced session, file will no longer be backed up.

COMMAND OVERVIEW
     The most important function keys, menu functions, and ced commands are
     summarized below in tabular form under different function groups. You
     will find more detailed descriptions in the section on WORKING WITH
     CED.

     Loading ced
     ______________________________________________________________________
    |    ced <RETURN>         |      Load ced with the file last edited   |
    |_________________________|___________________________________________|
    |    ced file <RETURN>    |      Load ced with the specified file     |
    |_________________________|___________________________________________|

     Quitting ced
     ______________________________________________________________________
    |   <MENU> qy  |    Quit ced and save changes in current file         |
    |______________|______________________________________________________|
    |   <MENU> qn  |    Quit ced without saving changes                   |
    |______________|______________________________________________________|
    |   <CTRL> @   |    Quit ced (emergency exit) without saving changes  |
    |______________|______________________________________________________|






Page 2                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     General editing functions
     ______________________________________________________________________
    |   <MENU> e            |     Enter new text (overwrite mode)         |
    |_______________________|_____________________________________________|
    |   <MENU> i            |     Insert new text into old (insert mode)  |
    |_______________________|_____________________________________________|
    |   <MENU> a            |     Save text                               |
    |_______________________|_____________________________________________|
    |   <F9>                |     Save in current file                    |
    |_______________________|_____________________________________________|
    |   <MENU> a <RETURN>   |     Save in current file                    |
    |                       |     In control panel: file                  |
    |_______________________|_____________________________________________|
    |   <MENU> a <RETURN>   |     Save in specified file                  |
    |_______________________|_____________________________________________|
    |   <MENU> qy           |     Quit ced and save in current file       |
    |_______________________|_____________________________________________|
    |   <MENU> d            |     Switch documents                        |
    |_______________________|_____________________________________________|
    |   <MENU> d <RETURN>   |     Switch to last file                     |
    |                       |     In control panel: file                  |
    |_______________________|_____________________________________________|
    |   <MENU> d <RETURN>   |     Switch to specified file                |
    |_______________________|_____________________________________________|
    |   <F10>               |     Switch documents                        |
    |_______________________|_____________________________________________|
    |   <MENU> c            |     Execute commands                        |
    |                       |     In control panel: [area] command        |
    |                       |     Values for area:                        |
    |                       |     nl lines from cursor position           |
    |                       |     n paragraphs from cursor position       |
    |                       |     - no input area; nothing deleted        |
    |                       |     Default: cursor position to             |
    |                       |     end of paragraph.                       |
    |_______________________|_____________________________________________|
    |   <MENU> !            |     Call shell (temporary escape to shell)  |
    |_______________________|_____________________________________________|
    |   <MENU> p            |     Program keys                            |
    |_______________________|_____________________________________________|
    |   <MENU> x            |     Show programmed keys                    |
    |_______________________|_____________________________________________|
    |   <MENU> t            |     Find tag                                |
    |_______________________|_____________________________________________|











Page 3                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     Special text-editing functions
     ______________________________________________________________________
    |     <MENU> l       |       Edit line                                |
    |____________________|________________________________________________|
    |     <MENU> lb      |       Insert a blank line                      |
    |____________________|________________________________________________|
    |     <MENU> ld      |       Delete and buffer a line                 |
    |____________________|________________________________________________|
    |     <MENU> li      |       Retrieve and insert the buffered line    |
    |____________________|________________________________________________|
    |     <MENU> lj      |       Join two lines                           |
    |____________________|________________________________________________|
    |     <MENU> lr      |       Delete the remainder of a line           |
    |____________________|________________________________________________|
    |     <MENU> ls      |       Split a line                             |
    |____________________|________________________________________________|
    |     <MENU> b       |       Edit line block                          |
    |____________________|________________________________________________|
    |     <MENU> bb      |       Insert blank lines                       |
    |____________________|________________________________________________|
    |     <MENU> bc      |       Copy the marked block                    |
    |____________________|________________________________________________|
    |     <MENU> bd      |       Delete and buffer the marked block       |
    |____________________|________________________________________________|
    |     <MENU> bi      |       Retrieve and insert the marked block     |
    |____________________|________________________________________________|
    |     <MENU> bm      |       Mark a line                              |
    |____________________|________________________________________________|
    |     <MENU> r       |       Edit rectangle                           |
    |____________________|________________________________________________|
    |     <MENU> rd      |       Delete a rectangle                       |
    |____________________|________________________________________________|
    |     <MENU> rh      |       Horizontal insertion                     |
    |____________________|________________________________________________|
    |     <MENU> rm      |       Mark a corner                            |
    |____________________|________________________________________________|
    |     <MENU> ro      |       Copy with overwrite                      |
    |____________________|________________________________________________|
    |     <MENU> rv      |       Vertical insertion                       |
    |____________________|________________________________________________|














Page 4                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     Positioning
     ______________________________________________________________________
    | <START>                         |  Start of the file                |
    |_________________________________|___________________________________|
    | <HOME><HOME><CURSOR-UP>         |  First line of the file           |
    |_________________________________|___________________________________|
    | <HOME><HOME><CURSOR-DOWN>       |  Last line of the file            |
    |_________________________________|___________________________________|
    | <PAGE-UP>                       |  Up 9 lines (½ window)            |
    |_________________________________|___________________________________|
    | <PAGE-DOWN>                     |  Down 9 lines (½ window)          |
    |_________________________________|___________________________________|
    | <F15>                           |  Down 19 lines (1 window)         |
    |_________________________________|___________________________________|
    | <F16>                           |  Up 19 lines (1 window)           |
    |_________________________________|___________________________________|
    | <MENU> w                        |  Position window                  |
    |                                 |  To a particular line or column:  |
    |                                 |  In control panel: n (number)     |
    |_________________________________|___________________________________|
    | <RETURN><CURSOR-UP><CURSOR-DOWN>|  line number n                    |
    |_________________________________|___________________________________|
    | <CURSOR-LEFT><CURSOR-RIGHT>     |  column number n                  |
    |                                 |  Relative to the current position:|
    |                                 |  In control panel: +n or -n       |
    |_________________________________|___________________________________|
    | <RETURN><CURSOR-DOWN>           |  n lines down                     |
    |_________________________________|___________________________________|
    | <CURSOR-UP>                     |  n lines up                       |
    |_________________________________|___________________________________|
    | <CURSOR-DOWN>                   |  n lines down                     |
    |_________________________________|___________________________________|
    | <CURSOR-LEFT>                   |  n columns to the left            |
    |_________________________________|___________________________________|
    | <CURSOR-RIGHT>                  |  n columns to the right           |
    |_________________________________|___________________________________|
    | <MENU> s                        |  Search for string                |
    |                                 |  In control panel: search-string  |
    |_________________________________|___________________________________|
    | <CURSOR-DOWN>,<RETURN> or <F13> |  Search forward                   |
    |_________________________________|___________________________________|
    | <CURSOR-UP> or <F14>            |  Search backward                  |
    |_________________________________|___________________________________|











Page 5                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     Cursor positioning
     ______________________________________________________________________
    |   <CURSOR-UP>                    |     One line up                  |
    |__________________________________|__________________________________|
    |   <HOME> <CURSOR-UP>             |     First line of window         |
    |__________________________________|__________________________________|
    |   <HOME> <HOME> <CURSOR-UP>      |     First line of file           |
    |__________________________________|__________________________________|
    |   <CURSOR-DOWN>                  |     One line down                |
    |__________________________________|__________________________________|
    |   <HOME> <CURSOR-DOWN>           |     Last line of window          |
    |__________________________________|__________________________________|
    |   <HOME> <HOME> <CURSOR-DOWN>    |     Last line of file            |
    |__________________________________|__________________________________|
    |   <CURSOR-LEFT>                  |     One character to the left    |
    |__________________________________|__________________________________|
    |   <WORD-RIGHT>                   |     Tab left (tab stops are in   |
    |                                  |     columns 1, 9, 17 etc.)       |
    |__________________________________|__________________________________|
    |   <HOME> <CURSOR-LEFT>           |     Left-hand edge of window     |
    |__________________________________|__________________________________|
    |   <HOME> <HOME> <CURSOR-LEFT>    |     Start of line                |
    |__________________________________|__________________________________|
    |   <HOME> <WORD-RIGHT>            |     Start of line                |
    |__________________________________|__________________________________|
    |   <CURSOR-RIGHT>                 |     One character to the right   |
    |__________________________________|__________________________________|
    |   <WORD-LEFT>                    |     Tab right (tab stops are in  |
    |                                  |     columns 1, 9, 17 etc.)       |
    |__________________________________|__________________________________|
    |   <HOME> <CURSOR-RIGHT>          |     Right-hand edge of window    |
    |__________________________________|__________________________________|
    |   <HOME> <HOME> <CURSOR-RIGHT>   |     End of line                  |
    |__________________________________|__________________________________|
    |   <HOME> <WORD-LEFT>             |     End of line                  |
    |__________________________________|__________________________________|


















Page 6                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     Keys
     ______________________________________________________________________
    |   <INSERT CHAR.>   |    Insert characters                           |
    |____________________|________________________________________________|
    |   <DELETE CHAR.>   |    Delete characters                           |
    |____________________|________________________________________________|
    |   <INSERT LINE>    |    Insert lines                                |
    |____________________|________________________________________________|
    |   <DELETE LINE>    |    Delete lines                                |
    |____________________|________________________________________________|
    |   <BACKSPACE>      |    Backspace; delete character left of cursor  |
    |____________________|________________________________________________|
    |   <CTRL-R>         |    Refresh screen                              |
    |____________________|________________________________________________|
    |   <CTRL-@>         |    Quit ced (emergency exit; files not saved)  |
    |____________________|________________________________________________|

     Delete characters in control panel
     ______________________________________________________________________
    |   <BACKSPACE>    |     Backspace; delete character left of cursor   |
    |__________________|__________________________________________________|
    |   <CTRL-X>       |     Delete everything entered                    |
    |__________________|__________________________________________________|

     Standard functions
     ______________________________________________________________________
    |      <START>       |        Start of file                           |
    |____________________|________________________________________________|
    |      <F9>          |        Save file                               |
    |____________________|________________________________________________|
    |      <F10>         |        Switch documents                        |
    |____________________|________________________________________________|
    |      <F11>         |        Mark line (2 marks)                     |
    |____________________|________________________________________________|
    |      <F12>         |        Copy line                               |
    |____________________|________________________________________________|
    |      <F13>         |        Search forward                          |
    |____________________|________________________________________________|
    |      <F14>         |        Search backward                         |
    |____________________|________________________________________________|
    |      <F15>         |        Page down                               |
    |____________________|________________________________________________|
    |      <F16>         |        Page up                                 |
    |____________________|________________________________________________|
    |      <F17>         |        Retrieve deleted line or line block     |
    |____________________|________________________________________________|








Page 7                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

WORKING WITH CED
     ced works on a copy of the file you want to edit. ced does not trans-
     fer the changes to the file itself until you

     -  quit ced and enter y to save your work (see q mode) or

     -  save the changes in the a mode. In this case you can also choose a
        different file name.

   The screen

     ** CED Text Editor V1.3   Line:   1  Column: 1  Name: file
     

     @
     @
     @
     @
     @
     @
     @
     @
     @
     @
     @
     @
     
     You wish to enter text?
     Please enter your text

     The header line shows:

     -  the ced version string,

     -  the current line and column position of the cursor,

     -  the name of the file currently displayed in the window.

   The window

     The window shows an extract from the file you are editing (19 lines).
     Blank lines at the bottom of a file are indicated by a tilde (~) at
     the start of each line. The position of the cursor given in the header
     line tells you which part of the file you are currently editing.










Page 8                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     You can shift the position of the window as shown below:

     <PAGE-UP>     up 9 lines (½ window),
     <PAGE-DOWN>   down 9 lines (½ window),
     <F15>         down 19 lines (1 window),
     <F16>         up 19 lines (1 window).

     In w mode (position the window) you can shift the window by any amount
     up, down, left or right.

     The window moves automatically when the cursor reaches the edge of the
     area displayed.

     Lines that extend beyond the right edge have a continuation character
     > in the last column.

   The control panel

     In the control panel, ced shows you the mode you have selected and the
     functions which are available to you in this mode.

     When you call ced, it always enters e mode (enter new text).

     In some modes you can make entries in the control panel, e.g. the file
     name in d mode (switch documents) or the character string to be
     searched for in s mode (search for string).

     An entry in the control panel can be corrected as follows:

     <BACKSPACE>   deletes characters one at a time
     <CTRL-X>      deletes everything you have entered

   Moving the cursor

     <CURSOR-UP>                    up
     <CURSOR-DOWN>                  down
     <CURSOR-RIGHT>                 right
     <CURSOR-LEFT>                  left
     <WORD-LEFT>                    tab right; tab stops are in columns 1,
                                    9, 17, 25 etc.
     <WORD-RIGHT>                   tab left
     <HOME>                         This key is used to move to the edges
                                    of the screen or document:
     <HOME> <CURSOR-RIGHT>          right-hand edge of the window
     <HOME> <CURSOR-LEFT>           left-hand edge of the window
     <HOME> <CURSOR-UP>             first line of the window
     <HOME> <CURSOR-DOWN>           last line of the window (unless end of
                                    file comes first)






Page 9                       Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     <HOME> <WORD-LEFT>             first column of the screen shifted 80
                                    columns to the right
     <HOME> <WORD-RIGHT>            first column of the current window
     <HOME> <HOME> <CURSOR-RIGHT>   last column (512)
     <HOME> <HOME> <CURSOR-LEFT>    first column (1)
     <HOME> <HOME> <CURSOR-UP>      first line of the file
     <HOME> <HOME> <CURSOR-DOWN>    last line of the file

   Selecting the mode

     Press the <MENU> key followed by a letter key in order to select one
     of the functions listed below:

     Key           Function

     <MENU> a      save text
     <MENU> b      edit line block
     <MENU> c      execute command
     <MENU> d      switch documents
     <MENU> e      enter new text
     <MENU> i      insert text
     <MENU> l      edit line
     <MENU> p      program keys
     <MENU> q      quit ced
     <MENU> r      edit rectangle
     <MENU> s      search for string
     <MENU> t      find tag
     <MENU> w      position window
     <MENU> x      show programmed keys
     <MENU>!       call shell
     <MENU> <HELP> displays a brief description of ced in English

     You can page forward or backward in the brief description, just as in
     any other file. If you specify a character string in s mode (search
     for string), you can use key <F13> or <F14> to search for this string
     in the brief description.

     ced normally processes inputs immediately without your having to press
     <RETURN>. Inputs in the control panel are the exception to this rule.
     The keys have different functions depending on the mode you are
     currently using.

   Undoing a mode selection

     If you have selected the wrong mode, press <MENU> again. This returns
     you to the initial menu from which you can reselect the mode you
     require.







Page 10                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

DESCRIPTION OF THE MODES

     <MENU> a - Save text

     The following text appears in the control panel:

         You wish to save your text?
         Please enter a file name or press <RETURN>

     In the control panel you give the name of the file in which the text
     that you are currently editing is to be stored. Then you press
     <RETURN>. If you do not enter a file name, ced writes the text into
     the current file. The name of the current file is shown in the header
     line. The original contents of the file are overwritten.

     If you press <CTRL-D>, the following text appears in the control
     panel:

         You wish to quit CED?
         Would you like to save your text?:  Enter y=yes or n=no

     You can now continue as described under mode q.

     <MENU> b - Edit line block

     The following text appears in the control panel:

        You wish to edit a line block?
        Please select one of the following functions: (b,c,d,i,m, <MENU>)

     In this mode you can edit blocks of consecutive lines. This entails
     marking the top and bottom lines of the range (function m).

     The following functions are available:

     m    Mark a line:

          Move the cursor to the required line and press the m key. ced
          issues the following message in the control panel: MARK SET. It
          is always the last two marks set which are valid. If a block of
          lines is deleted (function d), the marks are also deleted.

          If you only wish to edit a single line, you can mark it by press-
          ing the m key twice.

     b    Insert blank lines:

          A number of blank lines equal to the number contained in the
          marked area are inserted above the cursor line.





Page 11                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     c    Copy the marked area:

          A copy of the marked area is inserted above the cursor line.

     d    Delete and buffer the marked area:

          The marked area is deleted from the file and buffered. Each sub-
          sequent delete and buffer operation overwrites the block last
          buffered.

     i    Retrieve and insert the buffered area:

          The last block deleted and buffered (function m) is inserted
          above the cursor line.

          If you press <CTRL-D>, the following text appears in the control
          panel:

              You wish to quit CED?
              Would you like to save your text?:  Enter y=yes or n=no

          You can now continue as described under mode q.

     <MENU> c - Execute command

     The following text appears in the control panel:

         You wish to execute a command? -->
         Please enter a command

     In this mode you can call a Reliant UNIX command and pass an area of
     your file to it as input. ced replaces this area with the output from
     the executed command. You define the input area and the command to be
     executed in the input line of the control panel as follows:

     [area] command

     area Input area for the command. This area of the file is passed to
          the standard input of the command and deleted in the file.

          area can be: nl, n, -, *

          nl   n lines from the cursor position.

          n    n paragraphs from the paragraph in which the cursor is
               located. A paragraph is an area between two blank lines or
               between the start of the file and the first blank line.

          -    Empty input area. Nothing is deleted from the file, and no
               data is passed to the standard input of the Reliant UNIX
               command.



Page 12                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

          *    All the lines from the line containing the cursor to the end
               of the document

               Caution:

               If you put a blank in front of the asterisk (*), * will be
               executed as a Reliant UNIX command. As the shell expands the
               asterisk, there may be unexpected results.

          area not specified:

          The input area is the area from the cursor to the end of the
          paragraph.

     command
          The command to be executed. If there is an invalid argument, ced
          issues a message and does not delete the input area. All Reliant
          UNIX commands are allowed, with the exception of commands such as
          login, su, and any other commands which change the shell environ-
          ment.

          The output from the command is inserted at the point from which
          the input has been deleted. If you do not want anything to be
          deleted, you should specify an empty input area (0l or 0 or sim-
          ply -).

          Reliant UNIX commands that do not expect input (e.g. cat file)
          must not be passed an input area as this could result in malfunc-
          tioning. In this case you should always specify an empty area. If
          the SHELL variable is not set, Reliant UNIX commands cannot be
          executed.

     <MENU> d - Switch documents

     The following text appears in the control panel:

         You wish to switch documents? -->
         Please enter a file name or press <RETURN>

     In the control panel you give the name of the other file you want to
     edit. Then you press <RETURN>. In the window you see the start of the
     new file. ced is now in e mode (enter new text).

     If the file you name does not exist, ced asks whether the file is to
     be created. If you respond with y, a new file is created.









Page 13                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     Editing files in parallel

     If you have opened several files as described above, you can:

     ⊕  toggle from one file to another:

        Just press <RETURN> in d mode. ced to the file you worked on last.

     ⊕  transfer text from one file to another:

        -  Areas which you have marked (in mode b, r or l) in one file can
           be accessed directly from the other if you switch to the same
           mode again.

        -  Buffered blocks can be retrieved in the other file (mode b or
           l).

     If you switch to the q mode (quit ced), ced asks you if you want to
     have the current file saved. ced then does the same for the next open
     file in which you have made changes, and so on. In this way you can
     close all files edited during a ced session.

     <MENU> e - Enter new text

     The following text appears in the control panel:

         You wish to enter text?
         Please enter your text

     This is the text entry mode. In this mode, you may overwrite any text
     which is already in the file.

     The following keys (in the INSERT or DELETE block as appropriate) may
     prove useful:

     <CHAR.>   Insert or delete individual characters
     <LINE>    Insert or delete individual lines

     If you press <CTRL-D>, the following text appears in the control
     panel:

         You wish to quit CED?
         Would you like to save your text?:  Enter y=yes or n=no

     You can now continue as described under mode q.

     <MENU> i - Insert text

     The following text appears in the control panel:

         You wish to insert something in the text?
         Please insert your text


Page 14                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     In this mode you can insert text. The existing text located at the
     cursor position is shifted to the right, beyond the edge of the window
     if necessary. The maximum possible length for a line is 512 charac-
     ters. ced issues a message if the line gets too long.

     If you press <CTRL-D>, the following text appears in the control
     panel:

         You wish to quit CED?
         Would you like to save your text?:  Enter y=yes or n=no

     You can now continue as described under mode q.

     <MENU> l - Edit line

     The following text appears in the control panel:

        You wish to edit a line?
        Please select one of the following functions: (b,d,i,j,r,s, <MENU>)

     Use the cursor to select the line you want to manipulate.

     b    Insert a blank line:

          A blank line is inserted above the cursor line.

     d    Delete and buffer the line:

          The selected line is deleted and buffered. Each subsequent delete
          and buffer operation overwrites the line last buffered.

     i    Retrieve and insert the buffered line:

          The last line buffered is inserted above the cursor line.

     j    Join two lines:

          The selected line and the line which follows it are joined to
          form one line.

     r    Remove the remainder of the line:

          The remainder of the line from the cursor onward is deleted.

     s    Split the line:

          The rest of the line from the cursor position onward is written
          on a new line.

          If you press <CTRL-D>, the following text appears in the control
          panel:



Page 15                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

            You wish to quit CED?
            Would you like to save your text?:  Enter y=yes or n=no

          You can now continue as described under mode q.

     <MENU> p - Program keys

     The text of the menu used last is displayed in the control panel.

     In this mode you can assign character strings, text modules, cursor
     movements, and mode changes to certain keys.

     Although you can program almost any key in this way, preference should
     be given to the function keys. When you subsequently press a key that
     you have programmed, the character strings or instructions correspond-
     ing to it are passed to ced.

     Recording macros

     When you switch to the "Program keys" mode, the word PROTO appears in
     the header line. Everything that you do from here on is stored: text
     that you enter, mode changes, etc.

     To assign these actions to a key, press the <MENU> and <p> keys again.
     ced displays the message:

     ****PRESS KEY TO BE CHANGED

     Now press the key to which you wish to assign the stored actions. ced
     switches back to e mode (enter new text).

     Restricted keys

     You can program all keys except <MENU> and <p>.

     Preference should be given to keys <F1>, <F2> etc.

     Note that although keys <F9> to <F17> are bound to standard functions
     by ced (see Keys with special functions below), they can be repro-
     grammed for other purposes. Reprogrammed keys lose their original
     functions until restored by you, and as long as you save your text at
     the end of your session they stay reprogrammed for future ced ses-
     sions.

     When you quit ced, your key assignments are automatically stored for
     your login name (in the file /var/ced/CEkey.loginname). The next time
     you invoke ced, the key assignments you programmed in your last ced
     session will come into effect again.






Page 16                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     Cancelling key assignments

     Since all keys have their original function assignments in mode p, you
     can undo a macro assignment and restore the original function of the
     key as follows:

     Press <MENU> <p> (Program keys mode) followed by the key whose assign-
     ment you wish to undo. The original function of the key is now stored
     for the pending assignment. You then press <MENU> <p> and the key to
     be programmed, i.e. the key whose assignment is to be restored.

     <MENU> q - Quit ced

     The following text appears in the control panel:

         You wish to quit CED?
         Would you like to save your text?:  Enter y=yes or n=no

     In q mode you can choose whether or not to save the changes that you
     have made. Type y or n:

     y    (yes) You exit the editor and the changed file is saved; all
          changes are now incorporated into your file.

     n    (no) You exit the editor without saving the changes, i.e. the
          data that was originally in your file remains unaltered. Empty
          files are deleted at the end of the session unless they were
          already empty before the session began.

     If after pressing <MENU> q you do not wish to terminate the ced ses-
     sion but wish to continue, simply press <MENU> again. You will then be
     shown the selection menu and you may continue normally.

     <MENU> r - Edit rectangle

     The following text appears in the control panel:

        You wish to edit a rectangle?
        Please select one of the following functions: (d,h,m,o,v, <MENU>)

     A rectangle is an area of a file which you define by marking two diag-
     onally opposite corners (function m).

     m    Mark a corner:

          The position at which the cursor is located is marked when you
          press the m key. ced displays the message: MARK SET. The valid
          marks are always the last two marks set. Deleting a rectangle (d
          function) also deletes the marks.





Page 17                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     d    Delete a rectangle:

          The marked rectangle is deleted. It is not buffered anywhere. If
          you wish to reposition a rectangle, copy it first (function h, o
          or v) and then delete the original.

     h    Horizontal insertion:

          The marked rectangle is inserted, with its top left-hand corner
          at the cursor position. Text in the lines involved from the cur-
          sor column onward is shifted to the right.

     o    Copy with overwrite:

          The marked rectangle is copied with its top left-hand corner at
          the cursor position, overwriting existing text.

     v    Vertical insertion:

          The marked rectangle is inserted above the line marked by the
          cursor. The left-hand edge of the rectangle is on the column in
          which the cursor is located.

          If you press <CTRL-D>, the following text appears in the control
          panel:
              You wish to quit CED?
              Would you like to save your text?:  Enter y=yes or n=no

          You can now continue as described under mode q.

     <MENU> s - Search for string

     The following text appears in the control panel:

         You want to search for something? -->
         Please enter the search string

     You enter the character string that you wish to search for on the con-
     trol panel. The search can be started with one of the following keys:

     <CURSOR-DOWN> or <RETURN>   Search forward towards end of file
     <CURSOR-UP>                 Search back towards start of file

     If the character string does not occur again before end/start of file
     as appropriate, ced displays the message: TEXT NOT FOUND.

     Leading and trailing spaces are significant. Unlike some other edi-
     tors, ced does not recognize regular expressions.

     The search function can be terminated with the <DEL> key at any time.




Page 18                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     <MENU> t - Find tag

     If you have several C, Pascal, FORTRAN, lex or yacc source files that
     are part of a large program suite, you can use the ctags command to
     create a tag file containing the names and precise locations (i.e.
     file and position) of all functions belonging to this program suite.

     In the "Find tag" mode you enter the name of the function you want to
     go to in the control panel. ced switches to the appropriate file and
     positions the cursor on the definition of that function. The tag file
     must be in the current directory and contain the name of the specified
     function.

     <MENU> w - Position window

     The following text appears in the control panel:

         You wish to position the window? -->
         Please enter line, column or relative position (with prefix)

     You can shift the window in two ways in this mode:

     -  to a particular line or column:

        Enter an unsigned number in the control panel. The number must not
        be larger than the total number of lines in the file. Then press
        one of the following keys:

        <RETURN> or <CURSOR-UP> or <CURSOR-DOWN>

        The cursor is positioned at the specified line regardless of
        whether this line is before or after the current line.

        <CURSOR-LEFT> or <CURSOR-RIGHT>

        The window starts at the specified column. The cursor stays in the
        same line.

     -  relative to the current position:

        Enter a decimal number n preceded by a "+" or "-" sign and press
        one of the following keys:

        <RETURN>         n lines down
        <CURSOR-DOWN>    n lines down
        <CURSOR-UP>      n lines up
        <CURSOR-LEFT>    n columns to the left
        <CURSOR-RIGHT>   n columns to the right

        It does not matter whether you enter +n or -n. The direction of
        movement is determined by the arrow keys only.



Page 19                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     <MENU> x - Show programmed keys

     The following text appears in the control panel:

         TO CONTINUE PRESS <MENU>

     In x mode you can display the keys that you have programmed and the
     texts/actions assigned to them. A complete list is displayed on the
     full screen, i.e. not in a ced window. The key is shown to the left of
     the first colon, and the string/action assigned to it is shown to the
     right.

     The various symbols used, and their meanings are as follows:

     ->       <CURSOR-RIGHT>   cursor right
     <-       <CURSOR-LEFT>    cursor left
     UP       <CURSOR-UP>      cursor up
     DOWN     <CURSOR-DOWN>    cursor down
     HOME     <HOME>           cursor home
     MENU     <MENU>           pressed
     RETURN   <RETURN>         pressed

     Keys <F9> through <F17>, which are predefined by ced, are not
     displayed. To return to the main menu, press <MENU>.

     <MENU> ! - Call shell

     The following text appears below the control panel:

        >>> Exit to command shell, return to CED with the <CTRL-D> key.

     This mode allows you to exit from ced temporarily. ced calls the pro-
     gram that you have specified in the shell variable SHELL. You can set
     this variable in your .profile file, for example. If SHELL is not set,
     it is not possible to call a shell. In this way you can work in the
     shell temporarily, without losing the contents of the edited file. You
     terminate the shell and return to ced by pressing <CTRL-D>.

   Keys with special functions

     In addition to the keys already described, the following keys have
     special functions:

     <BACKSPACE>  You can use this key to delete individual characters;
                  also applies to the control panel.

     <CTRL-R>     You can use these keys to refresh the screen contents if
                  they have been disturbed, e.g. by a message from a back-
                  ground process.

     <CTRL-X>     These keys allow you to delete everything you have
                  entered in the control panel.


Page 20                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     <CTRL-@>     "emergency exit": if ced no longer responds to any input,
                  you can terminate it with this key combination. Any files
                  you have updated will not be saved.

                  If it is subsequently still not possible to input infor-
                  mation normally, consult the system administrator.

   Predefined standard functions

     <START>      Go to start-of-file.

     <F9>         Save file.

     <F10>        Switch documents: change to a second file which you have
                  already opened in d mode (switch documents) and back
                  again.

     <F11>        Mark line: the cursor line is marked. It can then be
                  copied with <F12>.

     <F12>        Copy line: a copy of the line which you previously marked
                  with <F11> is inserted above the cursor line.

     <F13>        Search forward: you must previously have defined the
                  required character string in s mode.

     <F14>        Search backward, otherwise same as <F13>.

     <F15>        Go forward one page.

     <F16>        Go back one page.

     <F17>        Retrieve line: the last line or line block that you
                  deleted and buffered is retrieved and inserted (depending
                  on whether you were in mode l or b).

     Insert the labeled strip supplied with your machine (showing the
     predefined standard key functions) in the space provided on your key-
     board.

ERROR MESSAGES
     ced: no status document /var/ced/CEttyname.loginname, start not possi-
     ble without document name

     -  You tried to call ced without naming the file you want to edit. The
        file /var/ced/CEttyname.loginname does not contain any suitable
        information on the file last edited. Call ced giving the name of
        the file you want to edit.






Page 21                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     ERROR IN COMMAND EXECUTION

     -  You used an incorrect or unsuitable command in mode c (execute com-
        mand).

     -  The syntax of the command you used is incorrect or invalid.

     INVALID INPUT

     -  You pressed one of the arrow keys <HOME>, <CURSOR-LEFT> or
        <CURSOR-RIGHT> in mode s (search for string), where you can only
        use <CURSOR-UP>, <CURSOR-DOWN> and <RETURN>.

     -  You selected a non-existent function in mode b (edit line block), l
        (edit line), or r (edit rectangle).

     -  You attempted to choose a non-existent mode from the menu.

     -  You tried to exit the brief description of ced under HELP by
        repeatedly pressing <CTRL-D>. Exit HELP by pressing <MENU>.

     -  While in the selection menu you tried to terminate your ced session
        by pressing <CTRL-D>. Use mode q instead (quit ced)

     -  You tried to exit mode s (search for string) or w (position window)
        by pressing <CTRL-D>. Press <MENU> instead.

     invalid key: press <MENU> to continue

     You tried to exit mode x (display key assignments) by pressing
     <CTRL-D>. Press <MENU> instead.

     LINE TOO LONG

     The line you are editing has grown longer than the permissible 512
     characters. This can happen if:

     -  you enter an overlong line in mode e (enter new text), obviously

     -  you shift text to the right of the cursor beyond the 512th column
        in mode i (insert text).

     -  you use the j function in mode l (edit line), and the combined
        length of the two lines to be joined is greater than 512 charac-
        ters.

     -  you use the h function in mode r (edit rectangle), and at least one
        line of the rectangle that you insert horizontally produces more
        than 512 characters when combined with the line already at that
        position.




Page 22                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     NO ALTERNATIVE DOCUMENT AVAILABLE

     When switching documents in mode d (switch documents), you did not
     give the name of the document you wanted to switch to and there are no
     other files open.

     NO TEXT

     You pressed function key <F13> (search forward) or <F14> (search back-
     ward) in mode s (search for string) without having defined a search
     string beforehand.

     NO TEXT AVAILABLE

     You marked a block in mode b (edit line block) and then attempted to
     retrieve it using the i function or the function key <F17> without
     first deleting and buffering it using the d function.

     THIS KEY CANNOT BE CHANGED

     You have made an attempt to program the <p> or <MENU> key in mode p
     (program keys). You should only use alphanumeric keys (but not p) or
     function keys <F1> through <F8> for macro assignments.

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts and menu functions are displayed. If LCMESSAGES is
     undefined or is defined as the null string, it defaults to the value
     of LANG. If LANG is likewise undefined or null, the system acts as if
     it were not internationalized.

     The LCALL environment variable governs the entire locale. LCALL
     takes precedence over all the other environment variables which affect
     internationalization.

ENVIRONMENT VARIABLES
     CEDTABS
          If this variable is set to NO, spaces are not converted to tabs
          when a file is saved. However, initial tabs at the start of a
          line that were already in the file when the session began are
          retained.

     TMPDIR
          By default, temporary files are stored in the /tmp directory.

          The TMPDIR variable defines the path under which ced stores tem-
          porary files if there is not enough space available in /tmp.







Page 23                      Reliant UNIX 5.44                Printed 11/98

ced(1)                                                               ced(1)

     SHELL
          In this variable you define the command interpreter to be used
          when a shell is called or a command is executed. If this variable
          is not set, it is not possible to call a subshell or run a com-
          mand from ced.

     TERM This variable defines the type of terminal. You cannot start ced
          if this variable is not set.

FILES
     /var/ced/CEkey.loginname
          File in which your personal key assignments are stored.

     /var/ced/CEttyname.loginname
          File from which ced determines the file that you last edited with
          ced and the position at which the cursor was last located.

     /var/ced/CEerror.number
          File in which error messages generated during the execution of a
          Reliant UNIX command are temporarily stored.

     /tmp/CEtextanumber
          File containing all changes made to a document in the course of a
          ced session.

     /tmp/CEtextbnumber
          Copy of the file that is being edited with ced.

SEE ALSO
     ed(1), ex(1), sed(1), vi(1).
























Page 24                      Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026