evil inside

York Zhao gtdplatform at gmail.com
Fri Aug 12 21:30:37 CEST 2011


Hi Tim,

Nice to see you here. I was using your "vimpulse-surround" every day while
on Vimpulse and have been missing it since switched to Evil. I almost wanted
to send you an email telling you how wonderful Evil looks like and hopped
that you would be implementing the "surround" in Evil soon. Now we got you.
:-)

York


On Fri, Aug 12, 2011 at 1:50 PM, Timothy Harper <timcharper at gmail.com>
wrote:
Just wanted to post that I switched out vimpulse for evil, and I am digging
it! Great work guys!  It feels more responsive, and less buggy.

I've started to extend evil to implement surround. So far I have surround
region implemented, that was easy. evil-define-key works brilliantly.
 Change surround / delete surround is going to be a little more tricky
though.

Previously, my approach was to implement custom text objects that were
flagged as surrounding text objects. Then I implemented
vimpulse-delete-surround-or-delete, vimpulse-change-surround-or-change,
bound then to 'd' and 'c' respectively, and prompted for a text object. If
the returned text object was flagged as a surround text object, I acted
accordingly, otherwise forwarded on to vimpulse-delete / vimpulse-change.

I think a better approach, this time, would be to implement
evil-change-maybe-surround. It would prompt for the next keystroke.  If 's',
then prompt for a text object and perform the operation. Otherwise, stick
the key back into unread-command-events and forward to evil-change.

Does a better extension mechanism exist, or is that approach a good one in
your eyes (Vegard?)

Thanks so much for bringing evil to my emacs! :)

Tim
_______________________________________________
implementations-list mailing list
implementations-list at lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ourproject.org/pipermail/implementations-list/attachments/20110812/48dc3fb2/attachment-0001.htm 


More information about the implementations-list mailing list