1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 07:14:11 +01:00

Add finder map aliases.

This commit is contained in:
Doug Kearns
2011-07-21 11:54:04 +10:00
parent a6cab89965
commit b4936fa481
2 changed files with 12 additions and 12 deletions

View File

@@ -45,7 +45,7 @@
</p> </p>
<item> <item>
<tags>/</tags> <tags><![CDATA[<find-forward> /]]></tags>
<spec>/<a>pattern</a><k name="CR"/></spec> <spec>/<a>pattern</a><k name="CR"/></spec>
<description> <description>
<p>Find <a>pattern</a> starting at the current caret position.</p> <p>Find <a>pattern</a> starting at the current caret position.</p>
@@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<tags>?</tags> <tags><![CDATA[<find-forward> ?]]></tags>
<spec>?<a>pattern</a><k name="CR"/></spec> <spec>?<a>pattern</a><k name="CR"/></spec>
<description> <description>
<p> <p>
@@ -86,7 +86,7 @@
</item> </item>
<item> <item>
<tags>n</tags> <tags><![CDATA[<find-next> n]]></tags>
<spec>n</spec> <spec>n</spec>
<description short="true"> <description short="true">
<p>Find next. Repeat the last find.</p> <p>Find next. Repeat the last find.</p>
@@ -94,7 +94,7 @@
</item> </item>
<item> <item>
<tags>N</tags> <tags><![CDATA[<find-previous> N]]></tags>
<spec>N</spec> <spec>N</spec>
<description short="true"> <description short="true">
<p>Find previous. Repeat the last find in the opposite direction.</p> <p>Find previous. Repeat the last find in the opposite direction.</p>
@@ -102,7 +102,7 @@
</item> </item>
<item> <item>
<tags>*</tags> <tags><![CDATA[<find-word-next> *]]></tags>
<spec>*</spec> <spec>*</spec>
<description short="true"> <description short="true">
<p>Search forward for the next occurrence of the word under cursor.</p> <p>Search forward for the next occurrence of the word under cursor.</p>
@@ -110,7 +110,7 @@
</item> </item>
<item> <item>
<tags>#</tags> <tags><![CDATA[<find-word-previous> #]]></tags>
<spec>#</spec> <spec>#</spec>
<description short="true"> <description short="true">
<p>Search backward for the previous occurrence of the word under cursor.</p> <p>Search backward for the previous occurrence of the word under cursor.</p>

View File

@@ -225,29 +225,29 @@ var RangeFinder = Module("rangefinder", {
var myModes = config.browserModes.concat([modes.CARET]); var myModes = config.browserModes.concat([modes.CARET]);
mappings.add(myModes, mappings.add(myModes,
["/"], "Find a pattern starting at the current caret position", ["/", "<find-forward>"], "Find a pattern starting at the current caret position",
function () { rangefinder.openPrompt(modes.FIND_FORWARD); }); function () { rangefinder.openPrompt(modes.FIND_FORWARD); });
mappings.add(myModes, mappings.add(myModes,
["?"], "Find a pattern backward of the current caret position", ["?", "<find-backward>"], "Find a pattern backward of the current caret position",
function () { rangefinder.openPrompt(modes.FIND_BACKWARD); }); function () { rangefinder.openPrompt(modes.FIND_BACKWARD); });
mappings.add(myModes, mappings.add(myModes,
["n"], "Find next", ["n", "<find-next>"], "Find next",
function () { rangefinder.findAgain(false); }); function () { rangefinder.findAgain(false); });
mappings.add(myModes, mappings.add(myModes,
["N"], "Find previous", ["N", "<find-previous>"], "Find previous",
function () { rangefinder.findAgain(true); }); function () { rangefinder.findAgain(true); });
mappings.add(myModes.concat([modes.CARET, modes.TEXT_EDIT]), ["*"], mappings.add(myModes.concat([modes.CARET, modes.TEXT_EDIT]), ["*", "<find-word-forward>"],
"Find word under cursor", "Find word under cursor",
function () { function () {
rangefinder.find(Buffer.currentWord(buffer.focusedFrame, true), false); rangefinder.find(Buffer.currentWord(buffer.focusedFrame, true), false);
rangefinder.findAgain(); rangefinder.findAgain();
}); });
mappings.add(myModes.concat([modes.CARET, modes.TEXT_EDIT]), ["#"], mappings.add(myModes.concat([modes.CARET, modes.TEXT_EDIT]), ["#", "<find-word-backward>"],
"Find word under cursor backwards", "Find word under cursor backwards",
function () { function () {
rangefinder.find(Buffer.currentWord(buffer.focusedFrame, true), true); rangefinder.find(Buffer.currentWord(buffer.focusedFrame, true), true);