aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJez Ng2013-03-02 22:55:33 -0500
committerJez Ng2013-03-02 22:56:26 -0500
commitdede759242850108d862ce09a1906ade1991870d (patch)
treea740255a9fa58f80f86dee24822148d42c843ef4
parent061d1b02f79c46461fd848703311864ca9cabbe9 (diff)
parent5f8d7647d63e22ed530ef818d312941b9b0b677c (diff)
downloadvimium-dede759242850108d862ce09a1906ade1991870d.tar.bz2
Merge remote-tracking branch 'deiga/float-tab' into HEAD
Conflicts: background_scripts/commands.coffee background_scripts/main.coffee
-rw-r--r--background_scripts/commands.coffee4
-rw-r--r--background_scripts/main.coffee3
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")