mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 08:47:59 +01:00
:bdelete google to close all tabs from google
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,10 +1,12 @@
|
||||
<pre>
|
||||
2008-06-xx:
|
||||
* version 1.2
|
||||
* :bdelete accepts an optional argument now
|
||||
* renamed some :autocmd, mainly BrowserStartup -> Startup and BrowserExit -> Quit
|
||||
* don't pass any ctrl- or alt- prefixed keys to firefox in insert mode
|
||||
* keywords in :open <arg> have higher priority than local files now
|
||||
* add :set online to control the "work offline" menu item
|
||||
* many small bug fixes
|
||||
|
||||
2008-06-03:
|
||||
* version 1.1
|
||||
|
||||
@@ -787,6 +787,8 @@ const liberator = (function () //{{{
|
||||
if (cancelQuit.data)
|
||||
return;
|
||||
|
||||
liberator.autocommands.trigger("Quit", "");
|
||||
|
||||
// notify all windows that an application quit has been granted.
|
||||
os.notifyObservers(null, "quit-application-granted", null);
|
||||
|
||||
@@ -918,11 +920,12 @@ const liberator = (function () //{{{
|
||||
if (option.setter && !option.hasChanged)
|
||||
option.reset();
|
||||
}
|
||||
|
||||
liberator.autocommands.trigger("Startup", "");
|
||||
}, 0);
|
||||
|
||||
liberator.statusline.update();
|
||||
|
||||
liberator.autocommands.trigger("Startup", "");
|
||||
liberator.log(liberator.config.name + " fully initialized", 1);
|
||||
},
|
||||
|
||||
|
||||
@@ -260,8 +260,43 @@ liberator.Tabs = function () //{{{
|
||||
"Delete current buffer",
|
||||
function (args, special, count)
|
||||
{
|
||||
if (args)
|
||||
{
|
||||
args = args.toLowerCase();
|
||||
var removed = 0;
|
||||
var match;
|
||||
if (match = args.match(/^(\d+):?/))
|
||||
{
|
||||
liberator.tabs.remove(liberator.tabs.getTab(parseInt(match[1], 10) - 1));
|
||||
removed = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var browsers = getBrowser().browsers;
|
||||
for (let i = browsers.length - 1; i >= 0; i--)
|
||||
{
|
||||
var title = browsers[i].contentTitle.toLowerCase() || "";
|
||||
var uri = browsers[i].currentURI.spec.toLowerCase();
|
||||
var host = browsers[i].currentURI.host.toLowerCase();
|
||||
|
||||
if (host.indexOf(args) >= 0 || uri == args ||
|
||||
(special && (title.indexOf(args) >= 0 || uri.indexOf(args) >= 0)))
|
||||
{
|
||||
liberator.tabs.remove(liberator.tabs.getTab(i));
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (removed > 0)
|
||||
liberator.echo(removed + " fewer tab(s)");
|
||||
else
|
||||
liberator.echoerr("E94: No matching tab for " + args);
|
||||
}
|
||||
else // just remove the current tab
|
||||
liberator.tabs.remove(getBrowser().mCurrentTab, count > 0 ? count : 1, special, 0);
|
||||
});
|
||||
},
|
||||
{ completer: function (filter) { return liberator.completion.buffer(filter); } });
|
||||
|
||||
liberator.commands.add(["tab"],
|
||||
"Execute a command and tell it to output in a new tab",
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
HEADER
|
||||
|
||||
|tabs| +
|
||||
|
||||
Tabs are used to be able to view many web pages at the same time...
|
||||
|
||||
|
||||
section:Closing{nbsp}tabs[closing-tabs]
|
||||
|
||||
|:tabc| |:tabclose| |:bun| |:bunload| |:bw| |:bwipeout| |:bd| |:bdelete|
|
||||
||:[count]bd[elete][!] [arg]|| +
|
||||
________________________________________________________________________________
|
||||
Delete current buffer (=tab). Count is supported, [c]:2bd[c] removes two tabs
|
||||
and the one to the right is selected.
|
||||
|
||||
When used with [arg], remove all tabs which contain [arg] in the hostname.
|
||||
[!] forces this command to also search for [arg] in the full URL and also
|
||||
the title of the tab. Use with care.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
TO BE WRITTEN...
|
||||
|
||||
|
||||
|
||||
@@ -760,15 +760,6 @@ The special version [c]:back![c] goes to the beginning of the browser history.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|:tabc| |:tabclose| |:bun| |:bunload| |:bw| |:bwipeout| |:bd| |:bdelete|
|
||||
||:[count]bd[elete][!]|| +
|
||||
________________________________________________________________________________
|
||||
Delete current buffer (=tab). Count is supported, [c]:2bd[c] removes two tabs
|
||||
and the one to the right is selected. Do [c]:bdelete![c] to select the tab to
|
||||
the left after removing the current tab.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|:beep|
|
||||
||:beep||
|
||||
________________________________________________________________________________
|
||||
|
||||
Reference in New Issue
Block a user