diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 2d20e2ca..81364d63 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -388,7 +388,7 @@ function Commands() //{{{ vimperator.marks.remove(args, special); }, { - usage: ["delm[arks]! {marks}"], + usage: ["delm[arks][!] {marks}"], short_help: "Delete the specified marks {a-zA-Z}", help: "Marks are presented as a list. Example:
" + ":delmarks Aa b p will delete marks A, a, b and p
" + diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js index 0dd70326..9fd80474 100644 --- a/chrome/content/vimperator/help.js +++ b/chrome/content/vimperator/help.js @@ -62,11 +62,13 @@ Vimperator.prototype.help = function(section, easter) //{{{ usage = usage.replace(//g, ">"); usage = usage.replace(/\\n/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"); + // color {count}, [!], {arg} and [arg] in the usage, not nice and error prone but the regexp work (for now) + usage = usage.replace(/({[^}]+})/g, "$1"); // required args + usage = usage.replace(/([^A-Za-z])(\[[^!\]]+\])/g, "$1$2"); // optional args + usage = usage.replace(/\[!\]/, "[!]"); // special // and the 'option' in a different color usage = usage.replace(/^'(\w+)'/gm, "'$1'"); - ret += "" +beg+ usage +end+ '
'; + ret += "" + beg + usage + end + '
'; } ret += '';