mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 14:12:27 +01:00
dd more rudimentary completion for options 'activate', 'pageinfo', 'newtab'
and 'popups'
This commit is contained in:
3
NEWS
3
NEWS
@@ -3,7 +3,8 @@
|
||||
* version 2.0 (probably)
|
||||
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
|
||||
VimperatorLeave respectively
|
||||
* add commandline completion to 'cpt' and 'defsearch'
|
||||
* add commandline completion to 'activate', 'cpt', 'defsearch', 'pageinfo',
|
||||
'newtab' and 'popups'
|
||||
* add 'helpfile' option
|
||||
* add 'wildignore' option
|
||||
* add :finish command
|
||||
|
||||
@@ -167,6 +167,14 @@ liberator.Buffer = function () //{{{
|
||||
|
||||
liberator.options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm",
|
||||
{
|
||||
completer: function (filter)
|
||||
{
|
||||
return [
|
||||
["g", "General info"],
|
||||
["f", "Feeds"],
|
||||
["m", "Meta tags"]
|
||||
];
|
||||
},
|
||||
validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1); }
|
||||
});
|
||||
|
||||
|
||||
@@ -66,6 +66,14 @@ const liberator = (function () //{{{
|
||||
|
||||
return value;
|
||||
},
|
||||
completer: function (filter)
|
||||
{
|
||||
return [
|
||||
["m", "Menubar"],
|
||||
["T", "Toolbar"],
|
||||
["b", "Bookmark bar"]
|
||||
];
|
||||
},
|
||||
validator: function (value)
|
||||
{
|
||||
var regex = "[^";
|
||||
|
||||
@@ -160,6 +160,15 @@ liberator.Tabs = function () //{{{
|
||||
"Define when tabs are automatically activated",
|
||||
"stringlist", "homepage,quickmark,tabopen,paste",
|
||||
{
|
||||
completer: function (filter)
|
||||
{
|
||||
return [
|
||||
["homepage", "gH mapping"],
|
||||
["quickmark", "go and gn mappings"],
|
||||
["tabopen", ":tabopen[!] command"],
|
||||
["paste", "P and gP mappings"]
|
||||
];
|
||||
},
|
||||
validator: function (value)
|
||||
{
|
||||
return value.split(",").every(function (item) { return /^(homepage|quickmark|tabopen|paste|)$/.test(item); });
|
||||
@@ -170,6 +179,17 @@ liberator.Tabs = function () //{{{
|
||||
"Define which commands should output in a new tab by default",
|
||||
"stringlist", "",
|
||||
{
|
||||
completer: function (filter)
|
||||
{
|
||||
return [
|
||||
["all", "All commands"],
|
||||
["addons", ":addo[ns] command"],
|
||||
["downloads", ":downl[oads] command"],
|
||||
["help", ":h[elp] command"],
|
||||
["javascript", ":javascript! or :js! command"],
|
||||
["prefs", ":pref[erences]! or :prefs! command"]
|
||||
];
|
||||
},
|
||||
validator: function (value)
|
||||
{
|
||||
return value == "all" || value.split(",").every(function (item) { return /^(addons|downloads|help|javascript|prefs|)$/.test(item); });
|
||||
@@ -193,6 +213,16 @@ liberator.Tabs = function () //{{{
|
||||
|
||||
return value;
|
||||
},
|
||||
completer: function (filter)
|
||||
{
|
||||
return [
|
||||
["0", "Force to open in the current tab"],
|
||||
["1", "Always open in a new tab"],
|
||||
["2", "Open in a new window if it has a specific requested size (default in Firefox)"],
|
||||
["3", "Always open in a new window"],
|
||||
["4", "Open in the same tab unless it has a specific requested size"]
|
||||
];
|
||||
},
|
||||
validator: function (value) { return (value >= 0 && value <= 4); }
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user