diff options
| author | Phil Crosby | 2010-03-07 17:27:29 -0800 |
|---|---|---|
| committer | Phil Crosby | 2010-03-07 22:50:21 -0800 |
| commit | 70b8c396c273172ad2bc5b5cead0db7ad071767c (patch) | |
| tree | a99f738718f4def93b2091f01d1fced6fdf3031f /commands.js | |
| parent | a0c85a9de03be5374c49e8da05f57fcd94caeded (diff) | |
| download | vimium-70b8c396c273172ad2bc5b5cead0db7ad071767c.tar.bz2 | |
Show a help dialog when pressing ? which displays all of the current keybindings o_O
Diffstat (limited to 'commands.js')
| -rw-r--r-- | commands.js | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/commands.js b/commands.js index 69501b5d..7cab1a56 100644 --- a/commands.js +++ b/commands.js @@ -52,6 +52,7 @@ function parseCustomKeyMappings(customKeyMappings) { } // Navigating the current page: +addCommand('showHelp', 'Show help.', true); addCommand('scrollDown', 'Scroll down.'); addCommand('scrollUp', 'Scroll up.'); addCommand('scrollLeft', 'Scroll left.'); @@ -87,8 +88,25 @@ addCommand('nextTab', 'Go one tab right.', true); addCommand('previousTab', 'Go one tab left.', true); addCommand('createTab', 'Create new tab.', true); addCommand('removeTab', 'Close current tab.', true); -addCommand('restoreTab', "Restore closed tab. (i.e. unwind the 'd' command).", true); - +addCommand('restoreTab', "Restore closed tab.", true); + + +// An ordered listing of all available commands, grouped by type. This is the order they will +// be shown in the help page. +var commandGroups = { + pageNavigation: + ["scrollDown", "scrollUp", "scrollLeft", "scrollRight", + "scrollToTop", "scrollToBottom", "scrollPageDown", "scrollPageUp", "scrollFullPageDown", + "reload", "toggleViewSource", "zoomIn", "zoomOut", "copyCurrentUrl", + "enterInsertMode", "activateLinkHintsMode", "activateLinkHintsModeToOpenInNewTab", + "enterFindMode", "performFind", "performBackwardsFind"], + historyNavigation: + ["goBack", "goForward"], + tabManipulation: + ["nextTab", "previousTab", "createTab", "removeTab", "restoreTab"] +}; + +mapKeyToCommand('?', 'showHelp'); mapKeyToCommand('j', 'scrollDown'); mapKeyToCommand('k', 'scrollUp'); mapKeyToCommand('h', 'scrollLeft'); |
