From d17af4b6d989b1c6fd09469e72ef5087421efc44 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Tue, 30 Oct 2007 14:26:53 +0000 Subject: [PATCH] changed always hints keys to ;f and ;F --- content/hints.js | 8 ++++---- content/mappings.js | 29 ++++++++++++++++++----------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/content/hints.js b/content/hints.js index 62ea0295..0777df10 100644 --- a/content/hints.js +++ b/content/hints.js @@ -414,7 +414,9 @@ outer: var loc = valid_hints.length > 0 ? valid_hints[0].href : ""; 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": vimperator.commandline.open(":", "open " + loc, vimperator.modes.EX); break; case "t": openHint(true, false); break; @@ -422,8 +424,6 @@ outer: case "T": vimperator.commandline.open(":", "tabopen " + loc, vimperator.modes.EX); break; case "w": openHint(false, true); 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(true); break; default: @@ -459,7 +459,7 @@ outer: // TODO: implement framesets 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(); return; diff --git a/content/mappings.js b/content/mappings.js index 868a211a..0c88f2fd 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -1055,7 +1055,7 @@ vimperator.Mappings = function() //{{{ { short_help: "Start QuickHint mode, but open link in a new tab", usage: ["F{hint}"], - help: "Like normal QuickMode (activated with f) but open the link in a new tab." + help: "Like normal QuickMode (activated with f) but opens the link in a new tab." } )); // addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["F"], @@ -1071,34 +1071,41 @@ vimperator.Mappings = function() //{{{ addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [";"], function(arg) { - if (arg == "a") + if (arg == "f") vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "o"); - else if (arg == "A") + else if (arg == "F") vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "t"); else 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}"], help: "ExtendedHint mode is useful, since in this mode you can yank link locations, open them in a new window or save images.
" + - "If you want to yank the location of hint 24, press ;y to start this hint mode.
" + - "Then press 24 to copy the hint location.
" + - "{mode} can be either of:
" + + "If you want to yank the location of hint 24, press ;y to start this hint mode. " + + "Then press 24 to copy the hint location.

" + + "{mode} can be either one of:
" + "" + - "Hintable elements for this mode can be set in the 'extendedhinttags' XPath string.", + "Additionally there are two {mode}s, which will start an AlwaysHint mode:
"+ + "" + + "These work like the f or F mappings but will keep you in AlwaysHint mode. " + + "This is useful if you want to open many links of one page without pressing f or F each time.
" + + "Hintable elements for all extended hint modes can be set in the 'extendedhinttags' XPath string.", flags: vimperator.Mappings.flags.ARGUMENT } ));