[implementations-list] Vimpulse update
laynor at gmail.com
Wed Jun 24 19:42:29 CEST 2009
Yeah :) I didn't think about yi/ya, as i never use it. It's very easy stuff
to add I think :)
By the way, the approach is a little different now, the code is more
polished, shorter, and, in one word, better :) take a look at the latest
version, that also enables repetition of those commands
2009/6/24 Marius Andersen <rezonatix3 at yahoo.no>
> > Fra: Alessandro Piras <laynor at gmail.com>
> > Emne: Re: [implementations-list] Vimpulse update
> > Til: "Vi/Vim implementations list" <
> implementations-list at lists.ourproject.org>
> > Dato: Mandag 22. juni 2009 13.34
> > it's easy stuff actually :) It works like this:
> > I modified the viper-prefix-arg-com function to introduce 4
> > new commands: da di ca ci. These commands will read-char to get motion
> > command.
> Yes, this is a very good way to do it. It means more objects can be easily
> added without any more mucking around in `viper-prefix-arg-com'.
> Anyway, I mailed Michael Kifer and asked if there was a way to avoid
> redefining `viper-prefix-arg-com', and he replied he couldn't think of one.
> So until the original function is redesigned, which will probably not happen
> any soon, I think we can hold on to the present approach. :)
> What now remains is copying commands, `yiw', `yas', etc., and visual
> commands like `viw' and `vas'. The former requires updating
> `viper-prefix-arg-com' with entries for `vimpulse-yi' and `vimpulse-ya',
> while the latter is just a matter of writing commands for moving the cursor.
> For example, `vas' moves the cursor one sentence forward if it's at the end
> of the selection, and one sentence backward if it's at the beginning.
> I think this illustrates another point, incidentally: the power of vi comes
> from the multitude of ways of combining very basic commands, but
> implementing those combinations requires lots and lots of code. Therefore I
> think building vimpulse.el on top on Viper, rather than implementing Vim
> emulation from scratch, is the better approach.
> Marius Andersen
> Alt i ett. Få Yahoo! Mail med adressekartotek, kalender og
> notisblokk. http://no.mail.yahoo.com
> implementations-list mailing list
> implementations-list at lists.ourproject.org
More information about the implementations-list