From e839bdef35c5b64ddbde20f36f3f8901190ef5c9 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Thu, 27 Sep 2007 01:54:59 +0000 Subject: [PATCH] :let shows all defined (global) variables now --- chrome/content/vimperator/commands.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 404b30a8..dde838d1 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -647,8 +647,24 @@ function Commands() //{{{ { if (!args) { + var str = ""; + for (var i in vimperator.globalVariables) + { + var value = vimperator.globalVariables[i]; + if (typeof value == "number") + var prefix = "#"; + else if (typeof value == "function") + var prefix = "*"; + else + var prefix = ""; + + str += "" + i + "" + prefix + value + "\n"; + } + if (str) + vimperator.echo("" + str + "
", true); + else + vimperator.echo("No variables found"); return; - // List all defined variables } var match;