<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>

<!DOCTYPE document SYSTEM "dactyl://content/dtd">

<document
    name="pattern"
    title="&dactyl.appName; Patterns"
    xmlns="&xmlns.dactyl;"
    xmlns:html="&xmlns.html;">

<h1 tag="text-find-commands">Text find commands</h1>
<toc start="2"/>

<p>
    &dactyl.appName; provides a Vim-like incremental find interface to
    replace &dactyl.host;'s crippled Typeahead Find. Among other improvements,
    our find service:
</p>
<ul>
    <li>
        Starts at the cursor position in the currently selected frame, unlike
        &dactyl.host;, which always starts at the beginning of the first frame
        for documents with more than one frame.
    </li>
    <li>
        Returns the cursor and viewport to their original position on cancel.
    </li>
    <li>
        Backtracks to the first successful match after pressing backspace,
        unlike &dactyl.host;, which will always continue from the last match.
    </li>
    <li>
        Supports reverse incremental find.
    </li>
    <li>
        Escape sequences to toggle link-only and case-sensitive find.
    </li>
    <li>
        Crude regular expression searches are supported.
    </li>
</ul>

<item>
    <tags><![CDATA[<find-forward> /]]></tags>
    <spec>/<a>pattern</a><k name="CR" link="false"/></spec>
    <description>
        <p>Find <a>pattern</a> starting at the current caret position.</p>

        <p>
            The following escape sequences can be used anywhere in
            <a>pattern</a> to modify the behavior of the search. When flags
            conflict, the last to appear is the one that takes effect.
        </p>

        <dl dt="width: 6em;">
            <dt>\c</dt> <dd>Perform case insensitive find (default if <o>findcase</o>=<str>ignore</str>).</dd>
            <dt>\C</dt> <dd>Perform case sensitive find (default if <o>findcase</o>=<str>match</str>).</dd>
            <dt>\l</dt> <dd>Search only in links, as defined by <o>hinttags</o>.</dd>
            <dt>\L</dt> <dd>Search the entire page.</dd>
            <dt>\r</dt> <dd>Process the entire pattern as a regular expression.</dd>
            <dt>\R</dt> <dd>Process the entire pattern as an ordinary string.</dd>
        </dl>

	<p>
	    <o>findflags</o> can be used to set flags that will be applied
	    implicitly to each search.
	</p>
    </description>
</item>

<item>
    <tags><![CDATA[<find-backward> <S-Slash> ?]]></tags>
    <spec>?<a>pattern</a><k name="CR" link="false"/></spec>
    <description>
        <p>
            Find a pattern backward of the current caret position in exactly the
            same manner as <k>/</k>.
        </p>
    </description>
</item>

<item>
    <tags><![CDATA[<find-next> n]]></tags>
    <spec>n</spec>
    <description short="true">
        <p>Find next. Repeat the last find.</p>
    </description>
</item>

<item>
    <tags><![CDATA[<find-previous> N]]></tags>
    <spec>N</spec>
    <description short="true">
        <p>Find previous. Repeat the last find in the opposite direction.</p>
    </description>
</item>

<item>
    <tags><![CDATA[<find-word-forward> *]]></tags>
    <spec>*</spec>
    <description short="true">
        <p>Search forward for the next occurrence of the word under cursor.</p>
    </description>
</item>

<item>
    <tags><![CDATA[<find-word-backward> #]]></tags>
    <spec>#</spec>
    <description short="true">
        <p>Search backward for the previous occurrence of the word under cursor.</p>
    </description>
</item>

<item>
    <tags>:noh :nohlfind</tags>
    <strut/>
    <spec>:noh<oa>lfind</oa></spec>
    <description>
        <p>
            Remove the find highlighting. The document is highlighted again
            when another find command is used or the <o>hlfind</o> option
            is set.
        </p>
    </description>
</item>

</document>

<!-- vim:se sts=4 sw=4 et: -->
