


TEXTEDIT_FILTERS(1)      USER COMMANDS        TEXTEDIT_FILTERS(1)



NAME
     textedit_filters, align_equals, capitalize, insert_brackets,
     remove_brackets,  shift_lines  -  filters provided with tex-
     tedit(1)

SYNOPSIS
     align_equals

     capitalize [ -u | -l | -c ]

     insert_brackets _l  _r

     remove_brackets _l _r

     shift_lines [ -t ] _n

DESCRIPTION
     Each of these filters is designed  to  operate  on  pending-
     delete selections in text subwindows.  You can use them from
     within text subwindows either by mapping  them  to  function
     keys  in  your  .textswrc  file  or  adding them to the text
     `Extras' menu in your .text_extras_menu file.  See the  _S_u_n_-
     _V_i_e_w  _U_s_e_r'_s  _G_u_i_d_e for details.  When a filter is used as a
     command (perhaps in a pipeline), it is applied to the  stan-
     dard input and the filtered text appears on standard output.

     align_equals lines up the `=' (equal signs) in C  assignment
     statements.   Some  programmers  feel  that  this  makes for
     improved readability.  It aligns all equal  signs  with  the
     rightmost  equal  sign  in  the  selection  (or the standard
     input), by padding with spaces between the sign and the pre-
     vious nonwhite character; it replaces the selection with the
     aligned text (or writes this text to the  standard  output).
     For instance:
          big_long_expression = x;
          shorter_expr = y;
          z += 1;
     becomes:
          big_long_expression = x;
          shorter_expr        = y;
          z                  += 1;

     capitalize changes the capitalization of the  selection  (or
     the  standard input) and replaces it (or writes to the stan-
     dard output).  The -l  option  converts  all  characters  to
     lower  case;  -c  converts  the first letter of each word to
     upper case; and -u converts all characters  to  upper  case.
     If  no  option  is  specified,  then capitalize consults its
     input to determine what to do.  If the text is all capitals,
     it is converted to all lower case.  If the text is all lower
     case or of mixed cases and contains no white space (such  as
     a  NEWLINE, SPACE, or TAB), it is converted to all capitals.



Sun Release 4.1   Last change: 19 February 1988                 1






TEXTEDIT_FILTERS(1)      USER COMMANDS        TEXTEDIT_FILTERS(1)



     If there is white space, then the case of the first  charac-
     ter in each word is inverted.

     insert_brackets surrounds the  selection  (or  the  standard
     input)  with the specified character sequences.  _l and _r are
     the left- and right-bracketing characters, respectively.

     remove_brackets removes the left- and right-bracketing char-
     acters,  specified  by _l and _r, respectively from the selec-
     tion (or the standard input).

     shift_lines adjusts indentation of  the  selection  (or  the
     standard input) by _n spaces, and replaces the selection with
     the adjusted  text  (or  writes  to  the  standard  output).
     shift_lines  adjusts  to the left when _n is negative.  If -t
     is specified, the lines are shifted left or right by  _n  tab
     stops.   The  default  is  8 spaces per tab stop, but if the
     first line of the selection (or the standard  input)  begins
     with white space, then the tab stops are set to four spaces.

FILES
     /tmp/Cap._p_i_d                  temporary file used  by  capi-
                                   talize
     /tmp/Ins._p_i_d                  temporary   file    used    by
                                   insert_brackets
     /usr/lib/.text_extras_menu    default `Extras' menu
     /usr/lib/.textswrc            sample function-key mappings

SEE ALSO
     textedit(1)

     _S_u_n_V_i_e_w _U_s_e_r'_s _G_u_i_d_e























Sun Release 4.1   Last change: 19 February 1988                 2



