CONTENTS | INDEX | PREV | NEXT
Constants are names, recognized by TV as values. Constants are:
B = 0
Z = size of buffer
Integer value, denoting the current size of the buffer.
. = current position
Integer value, denoting the offset (in characters) from the beginning
of the buffer. A position of 0 would mean that the current position
is at the beginning of the buffer. Similarly, a position of 100
indicates that there are 100 characters between the start of the
buffer and current position.
H = current buffer
Range 0 , Z , denoting the entire current buffer. This is one of only
two constants of type range.
N = current line
The range denoting the entire current line. This is one of only two
constants of type range. The RETURN character at the beginning
and end is NOT included by default. If the N is immediately followed
by a +, the returns at the beginning and end are included. This
allows anchoring of a search-string to line-begin or end.
NOTE 1: the first line has no leading return, and the last line may
not have a trailing one.
NOTE 2: A search on a line with a return may end on the next line.
NOTE 3: This constant is special in yet another way: it accepts an
argument, specifying how many lines to include in the selection in addition
to the current line. A negative argument looks back instead of forward.
As is clear from the above, the term 'constants' is not appropriate for
everything listed here, as many of them are constant only for as long as
the buffer or even the cursor position does not change.