From 6b6b6c2c8b64a43cc4177f5808b32c5ce4f564c9 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 28 Sep 2007 13:38:24 +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 11ed0cb5..f3f0fdd7 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -609,8 +609,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;