1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 04:07:58 +01:00

moved some mappings to buffer.js and hints.js

This commit is contained in:
Martin Stubenschrott
2008-02-23 21:17:39 +00:00
parent 3b461b18c2
commit a92f9c9a2b
3 changed files with 228 additions and 272 deletions

View File

@@ -31,6 +31,7 @@ vimperator.Hints = function () //{{{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
var modes = vimperator.config.browserModes || [vimperator.modes.NORMAL];
var submode = ""; // used for extended mode, can be "o", "t", "y", etc.
var hintString = ""; // the typed string part of the hint is in this string
@@ -419,6 +420,31 @@ vimperator.Hints = function () //{{{
validator: function (value) { return value >= 0; }
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// MAPPINGS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
vimperator.mappings.add(modes, ["f"],
"Start QuickHint mode",
function () { vimperator.hints.show(vimperator.modes.QUICK_HINT); });
vimperator.mappings.add(modes, ["F"],
"Start QuickHint mode, but open link in a new tab",
function () { vimperator.hints.show(vimperator.modes.QUICK_HINT, "t"); });
vimperator.mappings.add(modes, [";"],
"Start an extended hint mode",
function (arg)
{
if (arg == "f")
vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "o");
else if (arg == "F")
vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "t");
else
vimperator.hints.show(vimperator.modes.EXTENDED_HINT, arg);
},
{ flags: vimperator.Mappings.flags.ARGUMENT });
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////