mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:07:59 +01:00
changed always hints keys to ;f and ;F
This commit is contained in:
@@ -414,7 +414,9 @@ outer:
|
|||||||
var loc = valid_hints.length > 0 ? valid_hints[0].href : "";
|
var loc = valid_hints.length > 0 ? valid_hints[0].href : "";
|
||||||
switch (submode)
|
switch (submode)
|
||||||
{
|
{
|
||||||
case "f": focusHint(); break;
|
case ";": focusHint(); break;
|
||||||
|
case "a": saveHint(false); break;
|
||||||
|
case "s": saveHint(true); break;
|
||||||
case "o": openHint(false, false); break;
|
case "o": openHint(false, false); break;
|
||||||
case "O": vimperator.commandline.open(":", "open " + loc, vimperator.modes.EX); break;
|
case "O": vimperator.commandline.open(":", "open " + loc, vimperator.modes.EX); break;
|
||||||
case "t": openHint(true, false); break;
|
case "t": openHint(true, false); break;
|
||||||
@@ -422,8 +424,6 @@ outer:
|
|||||||
case "T": vimperator.commandline.open(":", "tabopen " + loc, vimperator.modes.EX); break;
|
case "T": vimperator.commandline.open(":", "tabopen " + loc, vimperator.modes.EX); break;
|
||||||
case "w": openHint(false, true); break;
|
case "w": openHint(false, true); break;
|
||||||
case "W": vimperator.commandline.open(":", "winopen " + loc, vimperator.modes.EX); break;
|
case "W": vimperator.commandline.open(":", "winopen " + loc, vimperator.modes.EX); break;
|
||||||
case "a": saveHint(false); break;
|
|
||||||
case "s": saveHint(true); break;
|
|
||||||
case "y": yankHint(false); break;
|
case "y": yankHint(false); break;
|
||||||
case "Y": yankHint(true); break;
|
case "Y": yankHint(true); break;
|
||||||
default:
|
default:
|
||||||
@@ -459,7 +459,7 @@ outer:
|
|||||||
// TODO: implement framesets
|
// TODO: implement framesets
|
||||||
this.show = function(mode, minor, filter)
|
this.show = function(mode, minor, filter)
|
||||||
{
|
{
|
||||||
if (mode == vimperator.modes.EXTENDED_HINT && !/^[afoOstTwWyY]$/.test(minor))
|
if (mode == vimperator.modes.EXTENDED_HINT && !/^[;asoOtTwWyY]$/.test(minor))
|
||||||
{
|
{
|
||||||
vimperator.beep();
|
vimperator.beep();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1055,7 +1055,7 @@ vimperator.Mappings = function() //{{{
|
|||||||
{
|
{
|
||||||
short_help: "Start QuickHint mode, but open link in a new tab",
|
short_help: "Start QuickHint mode, but open link in a new tab",
|
||||||
usage: ["F{hint}"],
|
usage: ["F{hint}"],
|
||||||
help: "Like normal QuickMode (activated with <code class='mapping'>f</code>) but open the link in a new tab."
|
help: "Like normal QuickMode (activated with <code class='mapping'>f</code>) but opens the link in a new tab."
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
// addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["F"],
|
// addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["F"],
|
||||||
@@ -1071,34 +1071,41 @@ vimperator.Mappings = function() //{{{
|
|||||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [";"],
|
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [";"],
|
||||||
function(arg)
|
function(arg)
|
||||||
{
|
{
|
||||||
if (arg == "a")
|
if (arg == "f")
|
||||||
vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "o");
|
vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "o");
|
||||||
else if (arg == "A")
|
else if (arg == "F")
|
||||||
vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "t");
|
vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "t");
|
||||||
else
|
else
|
||||||
vimperator.hints.show(vimperator.modes.EXTENDED_HINT, arg);
|
vimperator.hints.show(vimperator.modes.EXTENDED_HINT, arg);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
short_help: "Start an extended Hint mode",
|
short_help: "Start an extended hint mode",
|
||||||
usage: [";{mode}{hint}"],
|
usage: [";{mode}{hint}"],
|
||||||
help: "ExtendedHint mode is useful, since in this mode you can yank link locations, open them in a new window or save images.<br/>" +
|
help: "ExtendedHint mode is useful, since in this mode you can yank link locations, open them in a new window or save images.<br/>" +
|
||||||
"If you want to yank the location of hint <code>24</code>, press <code class=\"mapping\">;y</code> to start this hint mode.<br/>" +
|
"If you want to yank the location of hint <code>24</code>, press <code class=\"mapping\">;y</code> to start this hint mode. " +
|
||||||
"Then press <code>24</code> to copy the hint location.<br/>" +
|
"Then press <code>24</code> to copy the hint location.<br/><br/>" +
|
||||||
"{mode} can be either of:<br/>" +
|
"<code class='argument'>{mode}</code> can be either one of:<br/>" +
|
||||||
"<ul>" +
|
"<ul>" +
|
||||||
|
"<li><code class=\"mapping\">;</code> to focus a link and hover it with the mouse</li>" +
|
||||||
"<li><code class=\"mapping\">a</code> to save its destination (prompting for save location)</li>" +
|
"<li><code class=\"mapping\">a</code> to save its destination (prompting for save location)</li>" +
|
||||||
"<li><code class=\"mapping\">s</code> to save its destination</li>" +
|
"<li><code class=\"mapping\">s</code> to save its destination</li>" +
|
||||||
"<li><code class=\"mapping\">f</code> to focus a link and hover it with the mouse</li>" +
|
|
||||||
"<li><code class=\"mapping\">o</code> to open its location in the current tab</li>" +
|
"<li><code class=\"mapping\">o</code> to open its location in the current tab</li>" +
|
||||||
"<li><code class=\"mapping\">t</code> to open its location in a new tab</li>" +
|
"<li><code class=\"mapping\">t</code> to open its location in a new tab</li>" +
|
||||||
"<li><code class=\"mapping\">O</code> to open its location in an <code class=\"command\">:open</code> query</li>" +
|
"<li><code class=\"mapping\">O</code> to open its location in an <code class=\"command\">:open</code> query</li>" +
|
||||||
"<li><code class=\"mapping\">T</code> to open its location in a <code class=\"command\">:tabopen</code> query</li>" +
|
"<li><code class=\"mapping\">T</code> to open its location in a <code class=\"command\">:tabopen</code> query</li>" +
|
||||||
"<li><code class=\"mapping\">y</code> to yank its location</li>" +
|
|
||||||
"<li><code class=\"mapping\">Y</code> to yank its text description</li>" +
|
|
||||||
"<li><code class=\"mapping\">w</code> to open its destination in a new window</li>" +
|
"<li><code class=\"mapping\">w</code> to open its destination in a new window</li>" +
|
||||||
"<li><code class=\"mapping\">W</code> to open its location in a <code class=\"command\">:winopen</code> query</li>" +
|
"<li><code class=\"mapping\">W</code> to open its location in a <code class=\"command\">:winopen</code> query</li>" +
|
||||||
|
"<li><code class=\"mapping\">y</code> to yank its location</li>" +
|
||||||
|
"<li><code class=\"mapping\">Y</code> to yank its text description</li>" +
|
||||||
"</ul>" +
|
"</ul>" +
|
||||||
"Hintable elements for this mode can be set in the <code class=\"option\">'extendedhinttags'</code> XPath string.",
|
"Additionally there are two <code class='argument'>{mode}</code>s, which will start an AlwaysHint mode:<br/>"+
|
||||||
|
"<ul>" +
|
||||||
|
"<li><code class=\"mapping\">f</code> to open its location in the current tab</li>" +
|
||||||
|
"<li><code class=\"mapping\">F</code> to open its location in a new tab</li>" +
|
||||||
|
"</ul>" +
|
||||||
|
"These work like the <code class='mapping'>f</code> or <code class='mapping'>F</code> mappings but will keep you in AlwaysHint mode. " +
|
||||||
|
"This is useful if you want to open many links of one page without pressing <code class='mapping'>f</code> or <code class='mapping'>F</code> each time.<br/>" +
|
||||||
|
"Hintable elements for all extended hint modes can be set in the <code class=\"option\">'extendedhinttags'</code> XPath string.",
|
||||||
flags: vimperator.Mappings.flags.ARGUMENT
|
flags: vimperator.Mappings.flags.ARGUMENT
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user