CONTENTS | INDEX | PREV | NEXT
SYNTAX : ARG @:S / STRING /
: ARG @:S / /
RESULTING ARGUMENT: -1 (all or some of the requested matches were found)
0 (no matches were found)
FUNCTION : Search for a character string as many times as specified,
or as many times as the string exists (whichever is
smaller). Search starts at the current position in the
buffer. After execution, the cursor (and implicitly the
value of . ) is positioned immediately after the last
match found.
The modification character (delimiter) immediately
follows the command in the command sequence. This
character will be used instead of the ESC in the normal
search command. This character is followed by the search
string, which is terminated by the modification
character.
A negative argument forces backward search in the buffer.
In these cases, the cursor is positioned before the last
match found (counting backwards!).
No error-condition will ever result; the result
(whether 0 or -1) is simply returned.
ARGUMENT : The number of times to perform the search-action.
DEFAULT : 1
EXAMPLE : 0 u0 < @:s / ESC / ; %0 >
Will count the number of ESC characters in a loop. The
value of register 0 contains the number of matches found.
Note, that this is a very ineffective way to do this!
The same could be done by entering
h @s / ESC / u0
as command.
NOTE 1 : Search-behaviour is governed by the Search Mode setting
(see CTRL_X)
NOTE 2 : If the search string is empty (as in @:s / /) then the
previous search string is reused.
NOTE 3 : The search string (used for both search and replace
commands) is accessable in register _ at all times.
NOTE 4 : The modification character is arbitrary. It must not
occur the search string.
NOTE 5 : The RETURN character is allowed anywhere in the search
string.
MATRIX