diff options
Diffstat (limited to 'background_scripts/commands.coffee')
| -rw-r--r-- | background_scripts/commands.coffee | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index dd9a938c..08496e6b 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -21,6 +21,7 @@ Commands = description: description isBackgroundCommand: options.background passCountToFunction: options.passCountToFunction + noRepeat: options.noRepeat mapKeyToCommand: (key, command) -> unless @availableCommands[command] @@ -31,6 +32,7 @@ Commands = command: command isBackgroundCommand: @availableCommands[command].isBackgroundCommand passCountToFunction: @availableCommands[command].passCountToFunction + noRepeat: @availableCommands[command].noRepeat unmapKey: (key) -> delete @keyToCommandRegistry[key] @@ -63,7 +65,7 @@ Commands = continue unless @availableCommands[vimiumCommand] - console.log("Mapping", key, "to", vimiumCommand) + konsole.log("Mapping", key, "to", vimiumCommand) @mapKeyToCommand(key, vimiumCommand) else if (lineCommand == "unmap") continue if (splitLine.length != 2) @@ -88,7 +90,7 @@ Commands = "scrollToTop", "scrollToBottom", "scrollToLeft", "scrollToRight", "scrollPageDown", "scrollPageUp", "scrollFullPageUp", "scrollFullPageDown", "reload", "toggleViewSource", "copyCurrentUrl", "LinkHints.activateModeToCopyLinkUrl", - "openCopiedUrlInCurrentTab", "openCopiedUrlInNewTab", "goUp", + "openCopiedUrlInCurrentTab", "openCopiedUrlInNewTab", "goUp", "goToRoot", "enterInsertMode", "focusInput", "LinkHints.activateMode", "LinkHints.activateModeToOpenInNewTab", "LinkHints.activateModeWithQueue", "Vomnibar.activate", "Vomnibar.activateInNewTab", "Vomnibar.activateTabSelection", @@ -98,7 +100,7 @@ Commands = historyNavigation: ["goBack", "goForward"] tabManipulation: - ["nextTab", "previousTab", "firstTab", "lastTab", "createTab", "removeTab", "restoreTab"] + ["nextTab", "previousTab", "firstTab", "lastTab", "createTab", "duplicateTab", "removeTab", "restoreTab"] misc: ["showHelp"] @@ -107,7 +109,7 @@ Commands = # from Vimium will uncover these gems. advancedCommands: [ "scrollToLeft", "scrollToRight", "moveTabToNewWindow", - "goUp", "focusInput", "LinkHints.activateModeWithQueue", + "goUp", "goToRoot", "focusInput", "LinkHints.activateModeWithQueue", "goPrevious", "goNext", "Marks.activateCreateMode", "Marks.activateGotoMode"] defaultKeyMappings = @@ -133,6 +135,7 @@ defaultKeyMappings = "H": "goBack" "L": "goForward" "gu": "goUp" + "gU": "goToRoot" "gi": "focusInput" @@ -162,6 +165,7 @@ defaultKeyMappings = "w": "moveTabToNewWindow" "t": "createTab" + "yt": "duplicateTab" "x": "removeTab" "X": "restoreTab" @@ -226,6 +230,7 @@ commandDescriptions = # Navigating the URL hierarchy goUp: ["Go up the URL hierarchy", { passCountToFunction: true }] + goToRoot: ["Go to root of current URL hierarchy", { passCountToFunction: true }] # Manipulating tabs nextTab: ["Go one tab right", { background: true }] @@ -233,7 +238,8 @@ commandDescriptions = firstTab: ["Go to the first tab", { background: true }] lastTab: ["Go to the last tab", { background: true }] createTab: ["Create new tab", { background: true }] - removeTab: ["Close current tab", { background: true }] + duplicateTab: ["Duplicate current tab", { background: true }] + removeTab: ["Close current tab", { background: true, noRepeat: true }] restoreTab: ["Restore closed tab", { background: true }] moveTabToNewWindow: ["Move tab to new window", { background: true }] |
