[Vimperator] un[let]
Виктор
Виктор
Mon Sep 17 23:35:59 PDT 2007
В вт, 2007-09-18 в 01:59 +0200, Martin Stubenschrott написа:
> On Mon, Sep 17, 2007 at 10:36:44PM +0300, Виктор Кожухаров wrote:
> > I didn't notice any support for any kind of map leader, so I decided to
> > try and implement it myself. Since vim uses a variable to declare the
> > leader, I made this patch, which adds partial support for the let and
> > unlet commands, as well as a very rudimentary eval function (it's mostly
> > equivalent to the 6-th level eval function of vim), and a function to
> > return a reference a variable, as well as it's type.
>
> Sounds great, especially for a map leader which i wanted to implement as
> :set mapleader as being lazy. ;)
>
> What is actually missing in the patch, and what do you plan to fix in
> the near future?
This eval is "good enough" to implement what is needed for the :let
mapleader stuff. So I have no plans to "fix" anything to it, unless some
bug appears.
>
> I think the general design is good, and i will definitly commit it, when
> ready, or if you think it is ready now, you could even commit it
> yourself and improve it incrementally, which is probably the least work
> for us both to keep up with CVS changes.
I think it's ready. The only thing I'm not quite sure of is the
namespace of this eval function. It's clearly not in the range of the
true vimscript eval, so it might go there. But I think in general, all
vimscript functions should go into their own namespace, like
"vimperator.vimscript". That way we can isolate them with the 'with'
keyword, so that implementing the whole of vimscript sooner or later
will be possible.
However, since this isn't what the vimscript eval will be, it shouldn't
go into the vimscript namespace, rather, there should be another eval
function in that namespace that calls it (and that can still way after
you or I commit this).
I'll wait for a comment from Doug before committing this.
>
> But nice patch, thanks,
>
> Martin
>
> PS: I tested the patch shortly but since I never used vim's eval or
> hardly even :let, i hope others (Doug?) could comment, if the
> implementation is ok.
This eval is very rudimentary, it will only handle variable or option
lookups, and evaluate strings and numbers. But it will not do anything
beyond that, like logic or arithmetics (it's only a 6th degree eval).
> _______________________________________________
> Vimperator mailing list
> Vimperator at mozdev.org
> http://www.mozdev.org/mailman/listinfo/vimperator
--
Виктор Кожухаров /Viktor Kojouharov/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: =?UTF-8?Q?=D0=A2=D0=BE=D0=B2=D0=B0?= =?UTF-8?Q?_=D0=B5?=
=?UTF-8?Q?_=D1=86=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=BE?=
=?UTF-8?Q?_=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B0?=
=?UTF-8?Q?_=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?Q?_=D0=BE=D1=82?=
=?UTF-8?Q?_=D0=BF=D0=B8=D1=81=D0=BC=D0=BE=D1=82=D0=BE?=
Url : http://www.mozdev.org/pipermail/vimperator/attachments/20070918/5b0e8c67/attachment.bin
More information about the Vimperator
mailing list