Find a specific string or line.
Scope: View
Syntax
Parameters
up |
Searches upwards in the document. Must precede any, asis, or element. | ||
down |
Searches downwards in the document. Must precede any, asis, or element. | ||
visible |
Restricts the search to visible lines. For a line to be visible, its class must be included in the list specified by the include parameter or excluded from the list specified by the exclude parameter. If visible is not specified, the Editor searches all lines and places the cursor at the closest visible point to the string when found. If used, visible must be specified first. | ||
mark |
Marks the text as a character block, or mark the line as a line block. | ||
columns num1 num2 |
Restricts the search to a columnar area including the columns specified by num1 and num2, and the area between them. | ||
block |
Searches are restricted to the currently-selected block of text. | ||
alldocs |
Searches all documents currently open in the Editor. | ||
nowrap |
Searches will stop when the bottom of the file is reached. | ||
checkcurrent |
Begins searching at the current cursor position. | ||
nosave |
The current find operation is not saved into the lastfind parameter. | ||
emphasis |
Found text is emphasized in the view. | ||
asis TextString |
Searches for the text string using the exact form of characters specified. | ||
any TextString |
Searches for the text string regardless of case. | ||
match TextString match asis TextString |
Treats TextString as a regular expression search pattern. If asis is specified, the search pattern is case sensitive. | ||
element Number |
Searches for the line number specified. | ||
prefixentry prefixentry TextString |
Finds the next prefix entry. If TextString is specified, go to the next prefix entry that matches TextString. | ||
prefixtext TextString prefixtext to TextString |
Finds and goes to the next prefix text entry that matches TextString. | ||
prefixnumber Number |
Searches for the line that has the largest prefix number that is not greater than Number. | ||
next |
Finds the next occurrence in the find history. | ||
previous |
Finds the previous occurrence in the find history. | ||
oldline Number |
Search for the line that has been set with an old-line number of Number. | ||
|
|||
Description
The find command searches the current file view for the specified string or line number and then moves the current position to the string or line. If the string or line is not in the window, the window scrolls to display it. The search checks the entire file.
If no parameters are specified, find repeats the last find parameter that was processed. The last find parameter string is saved by the preserve command, and can be retrieved or changed using the lastfind parameter.
Examples
find visible any goto
Goto is searched for regardless of case.
find asis lxcmd
The text lxcmd in any other case form (for example, LXCMD or Lxcmd), is ignored.
find up asis fontstyle
API Return Codes
-1 |
A parameter issued with the command was not valid. Check the command 's syntax requirements and then issue the command again using a valid parameter. |
-2 |
The file contains no lines; no operations can be performed. |
-3 |
|
-8 |
Insufficient storage to continue. |
1 |
TextString or Number was not found. Check to see if the TextString or Number was typed correctly. |
2 |
The TextString specified for the find command occurs only once in this file. |
3 |
The text string or line number was found, but the Editor had to wrap from the top to bottom or bottom to top to find it. |
4 |
The prefix number was requested, but the file has no prefix numbers. |
5 |
The prefix number was requested, but the prefix numbers are not ordered. |
7 |
When using the change all parameter, a string was found at a wrap point. |
noPrefixEntryFound |
There are no prefix entries in the document. |
![]()
find Parameter
lastfind Parameter
oldline Parameter
preserve Command
setoldlines Command
