TEXTEDIT_FILTERS(1) — USER COMMANDS
NAME
textedit_filters, align_equals, capitalize, insert_brackets, shift_lines − filters provided with textedit(1)
SYNOPSIS
align_equals
capitalize
insert_brackets l r
shift_lines n
DESCRIPTION
When used within textedit(1), these filters can be chosen from a popup menu, and are applied to the current selection. See Windows and Window-Based Tools: Beginner’s Guide for details. When used as commands (perhaps in a pipeline), each filter is applied to the standard input.
Align_Equals
align_equals lines up the equal-signs (=) in C assignment statements. Some programmers feel that this makes for improved readability.
align_equals aligns all equal-signs with the rightmost equal-sign in the selection (or standard input), by padding with spaces between the equal-sign and the previous nonwhite character, and replaces the selection with the aligned text (or writes this text to the standard output).
For instance:
big_long_expression = z;
abc = x;
medium_expression = y;
z += 1;
becomes:
big_long_expression = z;
abc = x;
medium_expression = y;
z += 1;
Capitalize
capitalize changes the capitalization of the selection (or standard input) and replaces it (or writes to the standard output), as follows:
If the text is all capitals, it is converted to all lowercase.
If the text is all lowercase 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
insert_brackets surrounds the selection (or standard input) with brackets. l and r are left- and right-bracket characters, respectively.
Shift_Lines
shift_lines adjusts indention of the the selection (or 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.
SEE ALSO
Windows and Window-Based Tools: Beginner’s Guide
Sun Release 3.2 — Last change: 29 May 1986