up | Inhaltsverzeichniss | Kommentar

Manual page for TEXTEDIT_FILTERS(1)

textedit_filters, align_equals, capitalize, insert_brackets, remove_brackets, shift_lines - filters provided with textedit(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 [a manual with the abbreviation SVBG] 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 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 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 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. 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 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.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

SEE ALSO

textedit.1

[a manual with the abbreviation SVBG]


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97