Synopsis
Get the current offset from the beginning of the line
Usage
Int_Type _get_point ()
Description
The _get_point function returns the current character offset
fro the beginning of the line.
See also
Synopsis
Move to a specified offset from the beginning of the line
Usage
_set_point (Int_Type nth)
Description
The _set_point function moves the current editing position to
the nth character of the current line.
See also
Synopsis
backward_paragraph
Usage
Void backward_paragraph ();
Description
This function moves the current editing point backward past the
current paragraph to the line that is a paragraph separator. Such a
line is determined by the S-Lang hook
is_paragraph_separator . This
hook can be modified on a buffer by buffer basis by using the
function
set_buffer_hook .
See also
function bob
Synopsis
bob
Usage
Void bob ();
Description
The function
bob is used to move the current editing point to the
beginning of the buffer. The function
bobp may be used to determine
if the editing point is at the beginning of the buffer or not.
See also
function bol
Synopsis
bol
Usage
Void bol();
Description
This function moves the current editing point to the beginning of the
current line. The function
bolp may be used to see if one is already
at the beginning of a line.
See also
Synopsis
bskip_chars
Usage
Void bskip_chars (String str);
Description
This function may be used to skip past all characters defined by the
string
str . See
skip_chars for the definition of
str .
The following example illustrates how to skip past all whitespace
including newline characters:
bskip_chars (" \t\n");
See also
Synopsis
bskip_non_word_chars
Usage
Void bskip_word_chars ();
Description
This function moves the current editing point backward past all
non-word characters until a word character is encountered.
Characters that make up a word are set by the
define_word function.
See also
Synopsis
bskip_word_chars
Usage
Void bskip_word_chars ();
Description
This function moves the current editing point backward past all
word characters until a non-word character is encountered.
Characters that make up a word are set by the
define_word function.
See also
function down
Synopsis
down
Usage
Integer down(Integer n);
Description
The
down function is used to move the editing point down a number of
lines specified by the integer
n . It returns the number of lines
actually moved. The number returned will be less than
n only if the
last line of the buffer has been reached. The editing point will be
left at the beginning of the line if it succeeds in going down more
than one line.
Example: The function
define trim_buffer
{
bob ();
do
{
eol (); trim ();
}
while (down (1));
}
removes excess whitespace from the end of every line in the buffer.
See also
function eob
Synopsis
eob
Usage
Void eob();
Description
The
eob function is used to move the current point to the end of the
buffer. The function
eobp may be used to see if the current
position is at the end of the buffer.
See also
function eol
Synopsis
eol
Usage
Void eol();
Description
Moves the current position to the end of the current line. The function
eolp may be used to see if one is at the end of a line or not.
See also
Synopsis
forward_paragraph
Usage
Void forward_paragraph ();
Description
This function moves the current editing point forward past the end of
the current paragraph. Paragraph delimiters are defined through either
a buffer hook or via the hook is_paragraph_separator .
See also
Synopsis
goto_column
Usage
Void goto_column (Integer n);
Description
This function moves the current editing point to the column specified
by the parameter n . It will insert a combination of spaces and tabs
if necessary to achieve the goal.
Note: The actual character number offset from the beginning of the
line depends upon tab settings and the visual expansion of other
control characters.
See also
See also
Synopsis
goto_column_best_try
Usage
Integer goto_column_best_try (Integer c);
Description
This function is like
goto_column except that it will not insert
whitespace. This means that it may fail to achieve the column number
specified by the argument
c . It returns the current column number.
See also
Synopsis
goto_line
Usage
Void goto_line (Integer n);
Description
The goto_line function may be used to move to a specific line number
specified by the parameter n .
Note: The actual column that the editing point will be left in is
indeterminate.
See also
function left
Synopsis
left
Usage
Integer left(Integer n);
Description
left moves the editing point backward n characters and returns the
number actually moved. The number returned will be less than n only
if the top of the buffer is reached.
See also
Synopsis
right
Usage
Integer right(Integer n);
Description
This function moves the editing position forward forward n
characters. It returns the number of characters actually moved. The
number returned will be smaller than n if the end of the buffer is
reached.
See also
Synopsis
skip_chars
Usage
Void skip_chars(String s);
Description
This fnction may be used to move the editing point forward past all
characters in string
s which contains the chars to skip, or a range
of characters. A character range is denoted by two charcters
separated by a hyphen. If the first character of the string
s is a
'^' character, then the list of characters actually denotes the
complement of the set of characters to be skipped. To explicitly
include the hyphen character in the list, it must be either the first
or the second character of the string, depending upon whether or not
the
'^' character is present. So for example,
skip_chars ("- \t0-9ai-o_");
will skip the hyphen, space, tab, numerals
0 to
9 , the letter
a ,
the letters
i to
o , and underscore. An example which illustrates
the complement of a range is
skip_chars("^A-Za-z");
which skips all characters except the letters.
Note: The backslash character may be used to escape only the first
character in the string. That is,
"\\^" is to be used to skip over
^ characters.
See also
Synopsis
skip_non_word_chars
Usage
Void skip_non_word_chars ();
Description
This function moves the current editing point forward past all
non-word characters until a word character is encountered.
Characters that make up a word are set by the
define_word function.
See also
Synopsis
skip_white
Usage
Void skip_white ();
Description
The
skip_white function moves the current point forward until it
reaches a non-whitespace character or the end of the current line,
whichever happens first. In this context, whitespace is considered to
be any combination of space and tab characters. To skip newline
characters as well, the function
skip_chars may be used.
See also
Synopsis
skip_word_chars
Usage
Void skip_word_chars ();
Description
This function moves the current editing point forward across all
characters that constitute a word until a non-word character is
encountered. Characters that make up a word are set by the
define_word function.
See also
function up
Synopsis
up
Usage
Integer up(Integer n)
Description
This function moves the current point up n lines and returns the
number of lines actually moved. The number returned will be less than
n only if the top of the buffer is reached.
See also