diff --git a/NEWS b/NEWS index 285607f3..bcb11dbe 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ * version 2.0 (probably) * IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and VimperatorLeave respectively + * add :scriptnames * add commandline completion to 'activate', 'cpt', 'defsearch', 'pageinfo', 'newtab' and 'popups' * add 'helpfile' option diff --git a/content/io.js b/content/io.js index db715852..8b285b6a 100644 --- a/content/io.js +++ b/content/io.js @@ -40,6 +40,7 @@ liberator.IO = function () //{{{ var cwd = null, oldcwd = null; var extname = liberator.config.name.toLowerCase(); // "vimperator" or "muttator" var lastRunCommand = ""; // updated whenever the users runs a command with :! + var scriptNames = []; /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// OPTIONS //////////////////////////////////////////////// @@ -252,6 +253,21 @@ liberator.IO = function () //{{{ liberator.io.writeFile(file, line); }); + liberator.commands.add(["scrip[tnames]"], + "List all sourced script names", + function () + { + var list = ""; + + for (var i = 0; i < scriptNames.length; i++) + list += ""; + + list += "
" + (i + 1) + "." + scriptNames[i] + "
"; + + liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE); + }, + { argCount: "0" }); + liberator.commands.add(["so[urce]"], "Read Ex commands from a file", function (args, special) @@ -676,9 +692,11 @@ lookup: // no need (actually forbidden) to add: js <