ARPUS/ce, Version 2.6.2 (03/10/05) (SCCS 1.3)
_______________________________________________________________________________
[range] ca [<foreground_color>] [<background_color>]
"color area"
DESCRIPTION:
'ca' colors or removes color from a range of text. The range of
text follows the same mechanisms as xc and xd (copy and cut). ca
operates on a region of text that is either explicitly defined or
allowed to default. If no region is defined prior to invoking ca,
the default region is from the current cursor position to the end
of the line.
The colorization of data is associated with the data in that
position. If the data is copied and pasted somewhere else, the
colorization does NOT go with it. If data is pasted into or typed
into a colored area, the data inherites the color in that area.
Colorization is not saved in the file and is lost when ce is
exited.
ca with no parameters removes colorization and returns the data
to it's normal foreground and background colors. For example:
1,$ca will remove all the colorization from a file.
Either the forground color, the background color, or both may be
specified. If only one is specified, the other color will remain
the primary color. To specify only the background color, code ""
for the forground color.
PARAMETERS
<foreground_color>
This is the color to be applied to the text in the region
being colored. The color may be a named color such as red or
a hex RGB value such as '#654321'. Note that RGB values start
with a # and must therefore be enclosed in quotes. This
avoids them being mistaken for a comment. On most UNIX
systems the list of color names is found in
/usr/lib/X11/rgb.txt and contains the name along with the
decimal red, green, and blue intensity values. For example:
"1,5ca red" Will color from line 1 column 0 to the begining
of line 5 such that the text will be red. The command
"5,/abc/ ca yellow blue" will start at line 5 and then search
from the current cursor postion (before the mark at line 5)
for the string abc. This area will be colored so the
forground is yellow and the background is blue. If the
forground color is ommited, it is assumed to be the primary
foreground color.
<background_color>
This is the color to be applied to the area around the text
in the affected range. If the background color is ommitted,
it is assumed to be the primary background color. In this
case the background is actually tied to the primary
background color so that if a BGC Ce command is used, the
background color in the colorized area will change too.
EXAMPLES:
1. Change the foreground color on line 25 to blue. At the Ce
'Command:' prompt type:
25 ca blue
2. In this help file (assuming you are looking at the text
version and not the HTML version), change the background
color behind the word header <background_color> to orange.
Move the cursor the the angle bracket before the word
background and press mark (F1). Drag the cursor to just past
the close angle bracket and press Escape (Esc). At the Ce
'Command:' window type: ca '' orange
3. Open a ce window on file "file" with background white and
foreground (text) black. Immediately color the text in lines
5, 8, and 56 red. Then position the cursor to the beginning
of line 5. cv -fg black -bg white -cmd "5 ca red; 8 ca red;
56 ca red; 5" file
4. Open a ce window on file "file" with background DeepSkyBlue.
and foreground (text) black. Immediately color the
background of lines 5 through 56 white.
cv -fg black -bg red -cmd "5dr;echo;56;tr;ca "" white" file
5. A file is already open and your wish to color lines 5
through 56. You want columns 2 thru 59 colored blue and
columns 72 thru 134 colored red. In the Ce "Command:" window
type:
[5,2],[56,59]echo -r;ca blue;[5,72],[56,134]echo -r;ca red
RELATED HELP FILES:
xc (Copy )
bgc (Background Color)
fgc (Foreground Color)
nc (Next Color)
pc (Prev Color)
regionsCon (marking regions)
support (customer support)
_______________________________________________________________________________
Copyright (c) 2005, Robert Styma Consulting. All rights reserved.