diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/commands.coffee | 4 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 98724a20..08496e6b 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -108,7 +108,7 @@ Commands = # a focused, high-signal set of commands to the new and casual user. Only those truly hungry for more power # from Vimium will uncover these gems. advancedCommands: [ - "scrollToLeft", "scrollToRight", + "scrollToLeft", "scrollToRight", "moveTabToNewWindow", "goUp", "goToRoot", "focusInput", "LinkHints.activateModeWithQueue", "goPrevious", "goNext", "Marks.activateCreateMode", "Marks.activateGotoMode"] @@ -163,6 +163,7 @@ defaultKeyMappings = "g0": "firstTab" "g$": "lastTab" + "w": "moveTabToNewWindow" "t": "createTab" "yt": "duplicateTab" "x": "removeTab" @@ -240,6 +241,7 @@ commandDescriptions = 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 }] "Vomnibar.activate": ["Open URL, bookmark, or history entry"] "Vomnibar.activateInNewTab": ["Open URL, bookmark, history entry, in a new tab"] diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 5980e844..431d84be 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -222,6 +222,9 @@ BackgroundCommands = chrome.tabs.getSelected(null, (tab) -> chrome.tabs.duplicate(tab.id) selectionChangedHandlers.push(callback)) + moveTabToNewWindow: (callback) -> + chrome.tabs.getSelected(null, (tab) -> + chrome.windows.create({tabId: tab.id})) nextTab: (callback) -> selectTab(callback, "next") previousTab: (callback) -> selectTab(callback, "previous") firstTab: (callback) -> selectTab(callback, "first") |
