[Vimperator] map patch

Doug Kearns dougkearns at gmail.com
Thu Dec 6 22:12:32 PST 2007


On 12/7/07, Martin Stubenschrott <stubenschrott at gmx.net> wrote:
> On Fri, Dec 07, 2007 at 05:24:26AM +0100, calmar wrote:
> > I'm not really sure what you mean, could you point-out an example?
>
> -           var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
> -           var [lhs, rhs] = [matches[1], matches[2]];
> -           var leaderRegexp = /<Leader>/i;
> +     var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
> +     var [lhs, rhs] = [matches[1], matches[2]];
> +     var leaderRegexp = /<Leader>/i;

-     var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
-     var [lhs, rhs] = [matches[1], matches[2]];
+    var [, lhs, rhs] = args.match(/^(\S+)(?:\s+(.+))?$/);

Just golfing...

Doug


More information about the Vimperator mailing list