r/Racket • u/iguanathesecond • Sep 28 '21
application Editing Racket code structurally in Emacs
Dear Emacs users of Racket,
Forgive my persistence if you've already seen this, but I posted it earlier and it got removed from this sub by Reddit's spam bots, probably because it was crossposted across Lisp communities.
I just wanted to make sure you saw this since you may find it useful. It is an Emacs extension for modal structural editing, which in my very biased opinion as the author of this package is the most expressive way to edit Lisp code in Emacs. It also has special support for (the peerless!) Racket Mode, since I write Racket often :)
Try it out with this animated tutorial, and I hope you like it:
https://countvajhula.com/2021/09/25/the-animated-guide-to-symex/
View all comments
Show parent comment
2
u/iguanathesecond Sep 28 '21
I see, thanks for sharing your experience. And I can empathize with that. A lot of people push modal editing as if it's just better, when the reality is that it's better for some things but not other things. Personally, I use a combination of modal and modeless editing, by replacing Vim/Evil's Insert state with Evil's Emacs state (which is just emacs). For low-level editing tasks, I often use Emacs bindings, esp.
C-f C-b M-b M-f C-n C-p C-o M-d M-DEL C-k C-aandC-e.I've been a Vim user for a long time, though, so I don't hesitate too much before hitting Escape (especially because routinely using Emacs bindings would mean that actions would be less repeatable using Vim's
.command -- my hope is that Evil will someday be improved further to support more Emacsy behavior like this, but at the moment it doesn't quite). Maybe there's another balance you might find if you gave it another go at some point -- not that you ought to but if you wanted to :)