mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-10 10:14:11 +01:00
Add :window to run a command in a new window.
Works like :tab.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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(); },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: VIMperator configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" 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
|
||||
|
||||
@@ -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]|| +
|
||||
________________________________________________________________________________
|
||||
|
||||
Reference in New Issue
Block a user