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
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 <[email protected]> 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 [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On Aug 12, 2011, at 1:30 PM, York Zhao wrote:
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
Hey there York, Glad you found vimpulse-surround useful. I posted the partial port to github: https://github.com/timcharper/evil-surround/ If you'd like you can start using it. Only surround region is implemented… I plan to have the other functions ported soon as well :) Tim
On 2011-08-12 19:50 +0200, Timothy Harper wrote:
I've started to extend evil to implement surround.
I ported vimpulse-surround.el to Evil myself a few weeks ago. I intended to forward it to you sooner, but ended up extending its "testing period" indefinitely. Anyway, check your inbox!
Thanks so much for bringing evil to my emacs! :)
You're welcome. -- Vegard
The following message is a courtesy copy of an article that has been posted to gmane.emacs.vim-emulation as well. BTW. I pushed integration with wrap-region mode. It may be interesting too: https://gitorious.org/evil/evil/merge_requests/7
Ahh, I guess I should've checked the newsgroup before I tried to port it myself yesterday. Anyway, I've attached my version. I've only modified your vimpulse-surround.el minimally, most are just renaming and passing the correct arguments in the corresponding evil functions, and new surround bindings in motion state. I'm surprised it seems to be able to get all the surround functionalities working without changing any of your designs. I'm still looking forward to your port. Thank you for bringing the original vimpulse-surround and a hopefully an even better evil-surround, and thank all that bring us the wonderful evil! Best Regards On 11-08-12 11:50 AM, Timothy Harper 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
On Aug 13, 2011, at 1:56 PM, laputa5 wrote:
Ahh, I guess I should've checked the newsgroup before I tried to port it myself yesterday. Anyway, I've attached my version.
I've only modified your vimpulse-surround.el minimally, most are just renaming and passing the correct arguments in the corresponding evil functions, and new surround bindings in motion state. I'm surprised it seems to be able to get all the surround functionalities working without changing any of your designs.
I'm still looking forward to your port. Thank you for bringing the original vimpulse-surround and a hopefully an even better evil-surround, and thank all that bring us the wonderful evil!
Best Regards
Heh, makes 3 of us. Vegard secretly ported it a few weeks before I started (he did an amazing job!). I took his changes and made a few adjustments. You can find it all here: https://github.com/timcharper/evil-surround/ Everything works, as far as I can tell. Tim
On Aug 13, 2011, at 2:57 PM, Timothy Harper wrote:
Heh, makes 3 of us. Vegard secretly ported it a few weeks before I started (he did an amazing job!). I took his changes and made a few adjustments.
You can find it all here:
https://github.com/timcharper/evil-surround/
Everything works, as far as I can tell.
Tim
Some highlights that I really like about Vegard's design (the man is an emacs genius): * It now takes advantage of evil's ability to generate an overlay that contains the surrounding marks, and one inside. Deleting surrounding bracket-things is a matter of deleting the subtraction of the two. * It no longer requires custom redefinition of text objects. * It no longer relies on hacks. It's a very proper mode. Tim
Some highlights that I really like about Vegard's design (the man is an emacs genius):
* It now takes advantage of evil's ability to generate an overlay that contains the surrounding marks, and one inside. Deleting surrounding bracket-things is a matter of deleting the subtraction of the two. * It no longer requires custom redefinition of text objects. * It no longer relies on hacks. It's a very proper mode.
Tim
I just checked out the new code and took a look. It's beautiful!
participants (5)
-
Antono Vasiljev -
laputa5 -
Timothy Harper -
Vegard Øye -
York Zhao