ARPUS/ce, Version 2.6.2 (03/10/05) (SCCS 1.4) _______________________________________________________________________________ Concept: text regions. DESCRIPTION: A region is a portion of text upon which an operation is performed. There are three types of regions: EXPLICIT CONTINUOUS REGION (Marked and dragged) This is a region defined using the 'dr' (define region) command. Such a region starts at the point marked by 'dr' and includes all text up to BUT NOT INCLUDING the character under the cursor. By default, the function keys F1 and Shift/F1 are defined to execute the "mark" command. More exactly, the mark placed by the dr and the cursor is just before the position marked. Thus, if a mark is placed and the cursor moved closer to the beginning of the file, the region defined would not include the mark and would include the cursor under the character. The result of this behavior is that it does not matter whether you mark a region by marking (dr) at the top position and move the cursor to the bottom position or mark at the bottom position and move the cursor to the top position. The same region is marked. EXPLICIT CONTINUOUS REGION (defined) This is a region defined using two positioning commands separated by a comma. For example, 1,$xc defines the region from the first column of the first line of the file to the last character on the last line of the file and executes the copy (xc) command with this region defined. The 1 and the '$' can be replaced with any positioning commands. For example "[5,6],[20,25]echo" will highlight the region from line 5 column 6 to line 20 column 25. The comma sets a mark at the position defined in the first positioning command and then resets the current cursor position back to where it was before the first positioning command. This can best be illustrated with the following example. The command sequence "/abc/,/def/echo" will start searching from the current cursor position for the string "abc". When it finds it, the comma sets a mark just before the 'a' and returns the cursor position to the current position. Thus the search for "def" begins at the same place the search for "abc" began. In contrast to this is the sequence "/abc/dr;/def/echo. This sequence starts the search for "def" at the position where "abc" was found instead of the position where the search for "abc" began. IMPLICIT CONTINUOUS REGION This is a default region for a command. For example, if the 'xc' (text copy) command is issued without a 'dr' mark, the default region starts at the cursor location and includes all text up to and including the end of the line. The Copy (xc), Cut (xd), Bang (!), Substitute (s and so), Change Case (case), Remove tabs (untab), and Text Flow (tf) commands use this implicit region. RECTANGULAR REGION A rectangular region is defined by the positions of (i) the point that was marked via 'dr' and (ii) the position immediately to the left of the cursor. To illustrate, place the cursor directly on this X, mark that spot by pressing 'Shift/F1', and move the cursor around. Observe that the highlighted region is rectangular, EXCEPT when the cursor is in the exact same column as the initial mark (in this case, directly above or below the X). A rectangular region may be defined with commands the same way as an explicit rectangular region. The Copy (xc) and Cut (xd) commands have a "-r" parameter to specify that the region is to be treated as rectangular. To define a rectangular region for other commands an echo -r should be placed in the command stream. For example: "[5,5],[20,30]echo -r;! -c -m wc" The F1 and F1S function keys are defined by default as follows: kd F1 dr;echo ke kd F1S dr;echo -r ke Both definitions include the 'echo' command. 'echo' is what causes the highlight to be present. 'echo -r' causes a rectangular highlight to be present. RELATED HELP FILES: abrt (Abort) dr (Define Region) echo (Highlight Text) gm (Go to Mark) rm (Re-Mark) $ (Dollar) <num> (Line Number) = (Position) [ (Character Position) / (Forward Search) \ or ? (Backward Search) ! (bang ) xc (Copy ) xd (Cut ) xp (Paste) regexpCon (regular expressions) support (customer support) _______________________________________________________________________________ Copyright (c) 2005, Robert Styma Consulting. All rights reserved.