Paredit Video

If you’re working in a Lisp type language, you really want to be using paredit (or possibly smartparens). Smartparens can be used for any language or even plain text so many people prefer it. Some use both saving paredit for Lisp languages and using smartparens elsewhere.

As part of his Productive Emacs series, Arjen Wiersma has a nice video introduction to paredit. It gives you an idea of the basic functionality and what it can do. As Wiersma says, the nice thing about paredit is that it ensures you always maintain a syntactically correct program. It won’t let you do things like get unbalanced brackets or quotation marks. If you’ve written in a Lisp language you know how easy it is to get unbalanced brackets so paredit can be a life saver.

Wiersma’s video is 19 minutes so plan accordingly. If you decide you want to try it—and you should—be prepared for some frustration. I don’t know anyone who just started using it and stuck with it the first time. The real secret, I think, is understanding slurping and barfing. Wiersma’s video covers that important topic so after watching it and perhaps printing out a cheat sheet to help get you going you’ll be ready to try it out. Stick with it. Everyone who has, including me, says they wouldn’t want to live without it.

This entry was posted in General and tagged . Bookmark the permalink.
  • The strict balancing alone makes both libraries indispensable! :) The barfage and slurpage are nifty and you can still get by even if you stick with the "build in" s-expression manipulators. Beginner tip: C-q (quoted-insert) is how you insert unbalanced pairs when these modes are on.

  • Arjen Wiersma

    Thanks for the shoutout, the library is an absolute must to keep your sanity while editing anything lisp like, after a while you get so used to it and trust it that it is hard to imagine a world without it! :)