diff --git a/NEWS b/NEWS index 6197d06b..285607f3 100644 --- a/NEWS +++ b/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 diff --git a/content/buffer.js b/content/buffer.js index 158a1413..a14f1cc1 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -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); } }); diff --git a/content/liberator.js b/content/liberator.js index cea979a7..38caaf2b 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -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 = "[^"; diff --git a/content/tabs.js b/content/tabs.js index afa72f2a..49c620b0 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -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); } }); }