Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

TEXTEDIT(1)                 General Commands Manual                TEXTEDIT(1)

       textedit - SunView window- and mouse-based text editor

       textedit [ generic-tool-arguments ] [ -Ea on | off ] [ -adjust_is_pend-
       ing_delete ] [ -Ei on | off ] [ -auto_indent ] [  -Eo  on  |  off  ]  [
       -okay_to_overwrite  ]  [  -Er  on  |  off  ] [ -read_only ] [ -Ec N ] [
       -checkpoint count ] [ -EL lines ] [ -lower_context lines ] [ -Em pixels
       ]  [  -margin pixels ] [ -En N ] [ -number_of_lines lines ] [ -Es N ] [
       -scratch_window lines ] [ -ES N ] [ -multi_click_space radius ] [ -Et N
       ]  [  -tab_width  tabstop ] [ -ET N ] [ -multi_click_timeout intrvl ] [
       -Eu N ] [ -history_limit max ] [ -EU N ] [ -upper_context lines ] file-

       This command is available with the software installation option.  Refer
       to for information on how to install optional software.

       textedit is a mouse-oriented text editor that runs within  the  SunView
       environment.   It creates a window containing two text subwindows.  The
       top subwindow (referred to as the "scratch"  window)  can  be  used  to
       store  small  pieces of text.  The bottom subwindow (referred to as the
       "edit" window) displays the contents of filename, if given.

       The name of the file currently being edited is displayed in  the  left-
       hand  portion  of  the  frame  header.  The name of the current working
       directory is displayed in the right-hand portion.

                   textedit accepts the SunView generic tool arguments  listed
                   in sunview(1).

       -Ea on|off
                   Choose  whether  or  not an adjustment to a selection makes
                   the selection "pending-delete."  The default is off.   This
                   option  corresponds  to, and overrides, the adjust_is_pend-
                   ing_delete Text defaults entry.

       -Ei on|off
                   Choose whether or not to automatically indent  newly-opened
                   lines.  The default is off.  Corresponds to the auto_indent
                   Text default.

       -Eo on|off
                   Set behavior to the Store as New File menu item.  If  on  a
                   Store  as New File to the current file is treated as a Save
                   Current File.  If off (the standard default), Store as  New
                   File  operations  using  the  current filename result in an
                   error message.  Corresponds to Store_self_is_save.

       -Er on|off
       -read_only  Turn read-only mode on or off.  When  on,  text  cannot  be

       -Ec N
       -checkpoint count
                   Checkpoint  after every count editing operations.  If count
                   is 0 (the standard default), no checkpointing takes  place.
                   Each character typed, each Paste, and each Cut counts as an
                   editing operation.  Corresponds to checkpoint_frequency.

       -EL lines
       -lower_context lines
                   Specify the minimum number of lines  to  keep  between  the
                   caret and the bottom of the text subwindow.  The default is
                   2.  Corresponds to lower_context.

       -Em pixels
       -margin pixels
                   Set the scrollbar margin width in pixels.  The  default  is
                   4.  Corresponds to left_margin.

       -En N
       -number_of_lines lines
                   Set  the  number  of  lines  in  the bottom subwindow.  The
                   default is 45.

       -Es N
       -scratch_window lines
                   Set the number of lines in  the  scratch  window.   A  zero
                   value  means that there is no scratch window.  The standard
                   default is 1.  Corresponds to scratch_window.

       -ES N
       -multi_click_space radius
                   Set the radius, in pixels, within which clicks  must  occur
                   to be treated as a multi-click selection.  The default is 3
                   pixels.  Corresponds to multi_click_space.

       -Et N
       -tab_width tabstop
                   Set the number of SPACE characters displayed per TAB  stop.
                   The default is 8.  This option has no effect on the charac-
                   ters in the file.  Corresponds to tab_width.

       -ET N
       -multi_click_timeout intrvl
                   Set the interval, in milliseconds,  within  which  any  two
                   clicks must occur to be treated as a multi-click selection.
                   The  default   is   390   milliseconds.    Corresponds   to

       -Eu N
       -history_limit max
                   Set  the  maximum  number of editing operations that can be
                   undone or replayed.  The default  is  50.   Corresponds  to

       -EU  N
       -upper_context lines
                   Set  the  minimum number of lines to keep between the caret
                   and the top of the text subwindow.  The default is 2.  Cor-
                   responds to upper_context.

       For  a description of how to use the facilities of the text subwindows,
       see the

   Signal Processing
       If textedit hangs, for whatever reason, you can send a SIGHUP signal to
       its process ID, which forces it to write any changes (if possible):

              kill -HUP pid

       The  edits  are  written to the file textedit.pid in its working direc-
       tory.  If that fails, textedit successively tries to write to a file by
       that  name  in /var/tmp, and then /tmp.  In addition, whenever textedit
       catches a fatal signal, such as SIGILL, it tries to write out the edits
       before aborting.

   Defaults Options
       There  are several dozen user-specified defaults that affect the behav-
       ior of the text-based facilities.  See defaultsedit(1) for  a  complete
       description.  Important defaults entries in the Text category are:

       Edit_back_char    Set  the  character  for  erasing  to the left of the
                         caret.  The standard default is  DELETE.   Note:  the
                         tty  erase  character-setting has no effect on texte-
                         dit.  Text-based tools refer  only  to  the  defaults
                         database key settings.

       Edit_back_word    Set the character for erasing the word to the left of
                         the caret.  The standard default is CTRL-W.

       Edit_back_line    Set the character for erasing all characters  to  the
                         left of the caret.  The standard default is CTRL-U.

                         If  set  to 0 (the standard default) no checkpointing
                         is done.  For any value greater than zero,  a  check-
                         point is made each time the indicated number of edit-
                         ing operations has  been  performed  since  the  last
                         checkpoint.   Each  character  typed, each Paste, and
                         each Cut counts as an editing operation.  The  check-
                         point  file has a name of the form: filename%%, where
                         filename is the name of the file being edited.

   Making a selection
       In textedit, the mouse is used to specify a selection, which is a char-
       acter  span  to  operate  on.   The  mouse is also used to position the
       insertion point and to invoke a menu of commands.

       The assignment of commands to the mouse buttons is:

              Mouse button        Description

              LEFT                Starts a new selection and moves the  inser-
                                  tion point to the end of the selection near-
                                  est the mouse cursor.

              MIDDLE              Extends a selection, and moves the insertion

              RIGHT               Displays  a  menu  of  operations, explained

       There are two types of selections: a primary selection is indicated  by
       video-inversion  of  the  span  of characters, and tends to persist.  A
       secondary selection is indicated by underlining the span of  characters
       and  only  exists  while one of the four function keys corresponding to
       the commands Cut, Find, Paste, or Copy, is depressed.

       In addition, a  selection can  be  "pending-delete,"  as  indicated  by
       overlaying  the span of characters with a light gray pattern.  A selec-
       tion is made pending-delete by holding the CTRL key while clicking  the
       LEFT  or  MIDDLE  mouse  buttons.   If  a primary selection is pending-
       delete, it is only deleted when  characters  are  inserted,  either  by
       type-in  or  by  Paste  or  Copy.  If a secondary selection is pending-
       delete, it is deleted when the function key is released, except in  the
       case of the Find, which deselects the secondary selection.

       You  can  make  adjusted  selections switch to pending-delete using the
       adjust_is_pending_delete defaults entry, or the -Ea  option.   In  this
       case, CTRL-Middle makes the selection not pending-delete.

       Commands  that  operate on the primary selection do so even if the pri-
       mary selection is not in the window that issued the command.

   Inserting Text and Command Characters
       For the most part, typing any of the standard keys either  inserts  the
       corresponding  character  at the insertion point, or erases characters.
       However, certain key combinations are treated as commands.  Some of the
       most useful are:

       Command             Character           Description

       Cut-Primary         META-X              Erases, and moves to the Clipboard, the primary selection.
       Find-Primary        META-F              Searches the text for the pattern specified by the primary
                                               selection or by the Clipboard, if there is no primary selection.
       Copy-to-Clipboard   META-C              Copies the primary selection to the Clipboard.
       Paste-Clipboard     META-V              Inserts the Clipboard contents at the insertion point.
       Copy-then-Paste     META-P              Copies the primary selection to the insertion point (through
                                               the Clipboard).
       Go-to-EOF           CTRL-RETURN         Moves the insertion point to the end of the text, positioning
                                               the text so that the insertion point is visible.

   Function Keys
       The commands indicated by use of the function keys are:

       Command             Sun-2|3 Key         Description

       Stop                L1                  Aborts the current command.
       Again               L2                  Repeats the previous editing sequence since a
                                               primary selection was made.
       Undo                L4                  Undoes a prior editing sequence.
       Front               L5                  Makes the window completely visible (or
                                               hides it, if it is already exposed).
       Copy                L6                  Copies the primary selection, either to the
                                               Clipboard or at the closest end of the secondary
       Open                L7                  Makes the window iconic (or normal, if it is already
       Paste               L8                  Copies either the secondary selection or the Clipboard at
                                               the insertion point.
       Find                L9                  Searches for the pattern specified by, in order, the
                                               secondary selection, the primary selection, or the Clipboard.
       Cut                 L10                 Erases, and moves to the Clipboard, either the primary or
                                               the secondary selection.
       CAPSLOCK            F1                  Forces all subsequently typed alphabetic characters
                                               to be upper-case.
                                               This key is a toggle; striking it a second time undoes the
                                               effect of the first strike.

       Find usually searches the text forwards, towards the end.  Holding down
       the SHIFT key while invoking Find searches backward through  the  text,
       towards  the  beginning.  If the pattern is not found before the search
       encounters either extreme, it "wraps around"  and  continues  from  the
       other  extreme.   Find  starts the search at the appropriate end of the
       primary selection, if the primary selection is in  the  subwindow  that
       the  search  is  made  in;  otherwise it starts at the insertion point,
       unless the subwindow cannot be edited, in which case it starts  at  the
       beginning of the text.

       CTRL-Find invokes the Find and Replace pop-up frame.

       The  default assignment of function keys can be modified using default-

   Menu Items
       File      A pull-right menu item for file operations.

       Edit      A pull-right menu item equivalent  of  the  editing  function
                 keys.   The  Edit  submenu provides Again, Undo, Copy, Paste,
                 and Cut (same as function keys L2, L4, L6, L8, and L10).

       Display   A pull-right menu item for controlling the way text  is  dis-
                 played and line display format.

       Find      A pull-right menu item for find and delimiter matching opera-

       Extras    A user definable pull-right menu item.  The  Extras  standard
                 submenu  is  controlled  by  /usr/lib/text_extras_menu.  This
                 file has  the  same  syntax  as  .rootmenu  file.   See  sun-

       Only  those  items  that  are active appear as normal text in the menu;
       inactive items (which are inappropriate at the time) are "grayed out".

   User Defined Commands
       The file /usr/lib/text_extras_menu specifies filter programs  that  are
       included  in  the text subwindow Extras pull-right menu item.  The file
       ~/.textswrc specifies filter programs that are assigned to  (available)
       function  keys.   These filters are applied to the contents of the pri-
       mary selection.  Their output is entered at the caret.

       The file /usr/lib/textswrc is a sample containing a set of useful  fil-
       ters.  It is not read automatically.

       The  environment  variables  LC_CTYPE, LANG, and LC_default control the
       character classification throughout textedit.  On  entry  to  textedit,
       these  environment  variables  are  checked  in  the  following  order:
       LC_CTYPE, LANG, and LC_default.  When a valid value is found, remaining
       environment  variables  for  character classification are ignored.  For
       example, a new setting for LANG does not  override  the  current  valid
       character classification rules of LC_CTYPE.  When none of the values is
       valid, the shell character classification defaults to the  POSIX.1  "C"

       ~/.textswrc              specifies bindings of filters to function keys
                                specifies  bindings  of filters for the extras
                                menu pull-right items
       /usr/bin                 contains useful filters, including shift_lines
                                and capitalize.
       filename%                prior  version  of  filename is available here
                                after a Save Current File menu operation
       textedit.pid             edited  version  of  filename;  generated   in
                                response to fatal internal errors
       /tmp/Text*               editing session logs

       defaultsedit(1), kill(1), sunview(1)

       Cannot open file 'filename', aborting!
                                          filename does not exist or cannot be

       textedit produces the following exit status codes:

              0      normal termination
              1      standard SunView help message was printed
              2      help message was requested and printed
              3      abnormal termination in response to a signal, usually due
                     to an internal error
              4      abnormal  termination  during initialization, usually due
                     to a missing file or running out of swap space

       Multi-click to change the current selection does not  work  for  Adjust

       Handling of long lines is incorrect in certain scrolling situations.

       There is no way to replay any editing sequence except the most recent.

       `textedit newfile' fails if newfile does not exist.

                                2 October 1989                     TEXTEDIT(1)