diff --git a/common/content/liberator.js b/common/content/liberator.js index 83e73895..2d88640c 100755 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -496,6 +496,7 @@ const liberator = (function () //{{{ literal: 0 }); }); + commands.add(["exto[ptions]", "extp[references]"], "Open an extension's preference dialog", function (args) @@ -814,6 +815,7 @@ const liberator = (function () //{{{ argCount: "0", bang: true }); + }); /////////////////////////////////////////////////////////////////////////////}}} @@ -933,6 +935,7 @@ const liberator = (function () //{{{ NEW_WINDOW: 4, forceNewTab: false, + forceNewWindow: false, /** @property {string} The Liberator version string. */ version: "###VERSION### (created: ###DATE###)", // these VERSION and DATE tokens are replaced by the Makefile @@ -1576,6 +1579,8 @@ const liberator = (function () //{{{ if (liberator.forceNewTab) where = liberator.NEW_TAB; + else if (liberator.forceNewWindow) + where = liberator.NEW_WINDOW; else if (!where) where = liberator.CURRENT_TAB; diff --git a/vimperator/NEWS b/vimperator/NEWS index 4ad75ae0..19285553 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -19,6 +19,7 @@ (this might change again, as this is REALLY inconsistent, and i don't know if I like copying bugs) + * add [c]:window[c] to run a command in a new window * add ! version of :delbmarks to delete all bookmarks. * new "t" option for 'complete' to also switch to open tabs with :open * add [c]:toolbaropen[c], [c]:toolbarclose[c], and [c]:toolbartoggle[c] diff --git a/vimperator/content/config.js b/vimperator/content/config.js index af11e935..84ca9fed 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -267,6 +267,20 @@ const config = { //{{{ literal: 0 }); + commands.add(["wind[ow]"], + "Execute a command and tell it to output in a new window", + function (args) + { + liberator.forceNewWindow = true; + liberator.execute(args.string, null, true); + liberator.forceNewWindow = false; + }, + { + argCount: "+", + completer: function (context) completion.ex(context), + literal: 0 + }); + commands.add(["winc[lose]", "wc[lose]"], "Close window", function () { window.close(); }, diff --git a/vimperator/contrib/vim/syntax/vimperator.vim b/vimperator/contrib/vim/syntax/vimperator.vim index 12498f5f..e418707d 100644 --- a/vimperator/contrib/vim/syntax/vimperator.vim +++ b/vimperator/contrib/vim/syntax/vimperator.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: VIMperator configuration file " Maintainer: Doug Kearns -" Last Change: 2009 Aug 3 +" Last Change: 2009 Aug 10 " TODO: make this vimperator specific - shared liberator config? @@ -34,7 +34,7 @@ syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] b \ tabdu[plicate] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly] tabopen tabp[revious] tabr[ewind] tabs \ tbh[ide] tbs[how] tbt[oggle] time tn[ext] toolbarh[ide] toolbars[how] toolbart[oggle] tp[revious] u[ndo] una[bbreviate] \ undoa[ll] unl[et] unm[ap] ve[rsion] vie[wsource] viu[sage] vm[ap] vmap[clear] vno[remap] vu[nmap] w[rite] wc[lose] win[open] - \ winc[lose] wine[dit] wo[pen] wq wqa[ll] xa[ll] zo[om] + \ winc[lose] wind[ow] wine[dit] wo[pen] wq wqa[ll] xa[ll] zo[om] \ contained syn match vimperatorCommand "!" contained diff --git a/vimperator/locale/en-US/tabs.txt b/vimperator/locale/en-US/tabs.txt index 758de0a8..872bc043 100644 --- a/vimperator/locale/en-US/tabs.txt +++ b/vimperator/locale/en-US/tabs.txt @@ -29,6 +29,20 @@ support it, currently: ________________________________________________________________________________ +// TODO: move this somewhere more appropriate +|:window| |:wind | + +||:wind[ow] {cmd}|| +________________________________________________________________________________ +Execute {cmd} and tell it to output in a new window. Works only for commands +that support it, currently: + +* [c]:tab help[c] +* [c]:tab prefs[!][c] +* [c]:tab addons[c] +* [c]:tab downloads[c] +________________________________________________________________________________ + + |:tabdu| |:tabduplicate| ||:[count]tabdu[plicate]|| + ________________________________________________________________________________