4 ms·
Is it worth trying to make a serious effort with things like paredit, if you're already happy with default Emacs lisp modes? I feel like they're already overpow
by perihelions 4y ago
Is it worth trying to make a serious effort with things like paredit, if you're already happy with default Emacs lisp modes? I feel like they're already overpowered.
When I last tried this, I felt like I was struggling against the mode's understanding of my syntax, more than it was assisting me. I didn't figure out how to "think" in its language. I want to know if I'm missing out on something wonderful, or if it's more of a "just another tool, don't worry about it".
- ahmedalsudani 4y agoParedit made a massive difference when I was writing Lisp. It does take some getting used to, but pretty sure it was a net positive after a week of use. I actually started enabling it when writing other languages (Python/C++) to see if it could do its magic there.
- the-lazy-guy 4y agoYou probably know that, but there is smartparens mode which does similar magic to non-lisp languages: https://github.com/Fuco1/smartparens https://github.com/Fuco1/smartparens
- qorrect 4y agoI did not know that!
- ahmedalsudani 4y agoIn recent years, I have been spoiled by doom-emacs (and previously spacemacs). They have made everything work out of the box for me to such an extent that I mostly don't know what's active--I've just learned the right leader combination to get what I need done. It turns out I've been using smartparens without realizing--just opened a file and checked the active modes to find out. The keys I've learned are (using evil): - [Visual mode] S -> surround by a pair - [Visual mode] d <char> -> delete pair of <char> - [Visual mode] c <c1> <c2> -> replace pair of <c1> with pair of <c2> Those along with C-M-k to kill a sexp and % to go to the other end of a pair have been all I need for my work (the vast majority C/C++ and Python). One thing I keep putting off is figuring out a way to jump to the opening/closing quotes. For those I still have to go medieval if there's any nesting.
- lgas 4y agoI think it is worth it. Mastering it was one of the first times I felt like I had gained a programming power up. It's definitely a little awkward at first but if you keep at it, eventually the switch will flip and you'll wonder how you could've lived without it.
- Athas 4y agoParedit is so good that even after taking a break from Lisp for years, as soon as I opened up an .el file to do some Emacs customisation, the muscle memory was fully intact and I was able to perform structural edits without even thinking about which keys I pressed. I try not to write too much Lisp these days, because I inevitably become depressed at how clumsy it is to manipulate syntax in the languages I use more commonly.
- Barrin92 4y agoI would consider myself a fairly unserious paredit user and I still think it's immensely useful. The things I use most of the time are really just barf, slurp and splice yet it makes so much more sense to me now to think of S-expressions structurally rather than just editing text. Both the advantage and disadvantage of lisp are its lack of structure and paredit forcing you to keep your code intact really prevents a ton of issues just by having it on.
- srcreigh 4y agoSame. I don’t even have shortcuts for paredit, I just M-X barf-forward- whatever (fuzzy find with selectrum) when I need it. The only paredit shortcut I know is M-s to remove a set of parens. That said I also use boon, which has some modal editing in particular a way to skip past an entire set of parens. To GP: Why not enable it just for sake of keeping your parens balanced. Make sure you have a good way to discover commands like selectrum. And tada. Don’t have to learn it all right away.
- hirple 4y agoSomewhat related - does anyone use meow + paredit? I can’t find a clearly recommended way to combine the two as I can with boon.