diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index e50f2802..f236b696 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -371,7 +371,7 @@ var g_commands = [/*{{{*/ ], [ ["tabopen", "t", "to", "topen", "tabnew", "tabedit", "tabe"], - ["tabopen [url] [| [url]]"], + ["tabopen [url] [| url]"], "Open one or more URLs in a new tab", "Like :open but open URLs in a new tab.
"+ "If used with !, the 'tabopen' value of the 'activate' setting is negated.", @@ -428,7 +428,7 @@ var g_commands = [/*{{{*/ ], [ ["winopen", "w", "wo", "wopen", "winedit", "wine"], - ["win[open] [url] [| [url]]"], + ["win[open] [url] [| url]"], "Open an URL in a new window", "Not implemented yet", function () { echo("winopen not yet implemented"); }, @@ -481,8 +481,8 @@ var g_mappings = [/*{{{*/ [ ["B"], ["B"], - "Toggle the buffer list with all currently opened tabs.", - null, + "Toggle buffer list", + "Toggles the display of the buffer list which shows all opened tabs,", buffer_preview_toggle ], [ @@ -561,14 +561,14 @@ var g_mappings = [/*{{{*/ [ ["p", ""], ["p", ""], - "Open (put) an URL based on the current Clipboard contents in the current buffer", + "Open (put) an URL based on the current clipboard contents in the current buffer", "You can also just select some non-URL text, and search for it with the default search engine with p", function(count) { openURLs(readFromClipboard()); } ], [ ["P"], ["P"], - "Open (put) an URL based on the current Clipboard contents in a new buffer", + "Open (put) an URL based on the current clipboard contents in a new buffer", "Works like p, but opens a new tab.
"+ "Whether the new buffer is activated, depends on the 'activate' setting.", function(count) { openURLsInNewTab(readFromClipboard(), true); } @@ -576,15 +576,15 @@ var g_mappings = [/*{{{*/ [ ["r"], ["r"], + "Reload", "Forces reloading of the current page.", - null, function(count) { reload(false); } ], [ ["R"], ["R"], + "Reload all", "Forces reloading of all open pages.", - null, function(count) { reload(true); } ], [ @@ -612,35 +612,35 @@ var g_mappings = [/*{{{*/ [ ["y"], ["y"], - "Yank current location to the Clipboard", + "Yank current location to the clipboard", "Under UNIX the location is also put into the selection, which can be pasted with the middle mouse button.", yankCurrentLocation ], [ ["zi", "+"], ["zi", "+"], - "Zoom in current web page by 25%.", + "Zoom in current web page by 25%", "Currently no count supported.", function(count) { zoom_in(1); } ], [ ["zI"], ["zI"], - "Zoom in current web page by 100%.", + "Zoom in current web page by 100%", "Currently no count supported.", function(count) { zoom_in(4); } ], [ ["zo", "-"], ["zo", "-"], - "Zoom out current web page by 25%.", + "Zoom out current web page by 25%", "Currently no count supported.", function(count) { zoom_in(-1); } ], [ ["zO"], ["zO"], - "Zoom out current web page by 100%.", + "Zoom out current web page by 100%", "Currently no count supported.", function(count) { zoom_in(-4); } ], @@ -730,16 +730,16 @@ var g_mappings = [/*{{{*/ ], [ ["", "", "", ""], - ["", "", "", ""], - "Scroll up a full page of the current document. No count support for now.", - null, + [""], + "Scroll up a full page of the current document", + "No count support for now,", function(count) { goDoCommand('cmd_scrollPageUp'); } ], [ ["", "", "", ""], - ["", "", "", ""], - "Scroll down a full page of the current document. No count support for now.", - null, + [""], + "Scroll down a full page of the current document", + "No count support for now,", function(count) { goDoCommand('cmd_scrollPageDown'); } ], @@ -775,15 +775,16 @@ var g_mappings = [/*{{{*/ [ ["gu", ""], ["{count}gu", "{count}"], - "Go up one directory component", + "Go to parent directory", "Count is supported, 2gu on http://www.example.com/dir1/dir2/file.htm would open http://www.example.com/dir1/", goUp ], [ ["gU", ""], ["gU", ""], - "Go up one directory component", - "gU on http://www.example.com/dir1/dir2/file.htm opens http://www.example.com/", + "Go to the root of the website", + "gU on http://www.example.com/dir1/dir2/file.htm opens http://www.example.com/.
"+ + "When browsing a local directory, it goes to the root document.", function(count) { openURLs("..."); } ], diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js index ee38e49e..4d086e97 100644 --- a/chrome/content/vimperator/help.js +++ b/chrome/content/vimperator/help.js @@ -80,16 +80,6 @@ function help(section, easter) var ret = ""; for (var i=0; i < commands.length; i++) { - // the tags which are printed on the top right - ret += ''; - for (var j=0; j < commands[i][COMMANDS].length; j++) - { - var cmd_name = commands[i][COMMANDS][j]; - cmd_name = cmd_name.replace(//g, ">"); - ret += "" +beg+ cmd_name +end+ ''; - } - // the usage information for the command ret += ''; for (var j=0; j < commands[i][USAGE].length; j++) @@ -100,10 +90,11 @@ function help(section, easter) usage = usage.replace(/[^b][^r][^\/]>/g, ">"); // color {count} and [url] arguments in the usage, not nice and error prone but the regexp work (for now) usage = usage.replace(/(^|;|\n|\s|\]|\}|=|)({.*?}|\[.*?\])/gm, "$1$2"); - //usage = usage.replace(/(\s)({|\[)(.*)(\]|})(.*)/g, "$1$2$3$4$5"); + // and the 'setting' in a different color + usage = usage.replace(/^'(\w+)'/gm, "'$1'"); ret += "" +beg+ usage +end+ '
'; } - ret += ''; + ret += ''; // the actual help text with the first line in bold if (commands[i][SHORTHELP]) @@ -121,11 +112,21 @@ function help(section, easter) } else ret += "Sorry, no help available"; + // the tags which are printed on the top right + //ret += '===================================='; + ret += ''; + for (var j=0; j < commands[i][COMMANDS].length; j++) + { + var cmd_name = commands[i][COMMANDS][j]; + cmd_name = cmd_name.replace(//g, ">"); + ret += "" +beg+ cmd_name +end+ '
'; + } ret += ''; // add more space between entries if (i < commands.length-1) - ret += ''; + ret += '
'; } return ret; }