Switch to SpeakEasy.net DSL

The Modular Manual Browser

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

TEXTEDIT_FILTERS(1)         General Commands Manual        TEXTEDIT_FILTERS(1)

       textedit_filters,     align_equals,     capitalize,    insert_brackets,
       remove_brackets, shift_lines - filters provided with textedit(1)


       capitalize [ -u | -l | -c ]

       insert_brackets l  r

       remove_brackets l r

       shift_lines [ -t ] n

       Each of these filters is designed to operate on  pending-delete  selec-
       tions 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 for details.  When a filter is used as a command (perhaps in  a
       pipeline),  it  is  applied to the standard 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 previous nonwhite character; it replaces  the  selection  with  the
       aligned  text  (or  writes  this  text  to  the  standard output).  For
              big_long_expression = x;
              shorter_expr = y;
              z += 1;
              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 standard 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 con-
       verted 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.  If there is  white  space,  then  the
       case of the first character 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 characters,
       specified by l and r, respectively from the selection (or the  standard

       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.

       /tmp/Cap.pid                  temporary file used by capitalize
       /tmp/Ins.pid                  temporary file used by insert_brackets
       /usr/lib/.text_extras_menu    default `Extras' menu
       /usr/lib/.textswrc            sample function-key mappings


                               19 February 1988            TEXTEDIT_FILTERS(1)