I saw this post from mbork on paragraph filling. It’s a nice post and I’ll probably write about it later but today I want write about something else he mentioned in his post: unfill.el. It’s from Steve Purcell and has been around for a couple of years but I somehow missed it.
Most of my Emacs buffers are set to wrap text, which is usually what you want to do but for writing buffers, such as my blog posts, I use visual line mode and don’t want any filling. More often than you’d think I would, I find myself writing a blog post or some other prose and discover that I’m filling text lines.
My usual solution to this is to let the line length to a large value and call fill-paragraph. That’s not very hard but it’s a pain and I should have automated it long ago but my laziness kicked in and I never did. Happily, Purcell has done this for me. It does the same thing I did manually but with a single key press. Even better, he provides the unfill=toggle function. If you call it once, it fills the paragraph. If you call it again, it unfills the paragraph. That’s nice because you can bind unfill-toggle to Meta+q, or whatever you usually bind the fill command to, and get both commands for the price of one. In the mean time, I’ve installed unfill.el and bound Meta+q to unfill-toggle. One more tiny nub sanded down.
Update : unfill.org → unfill.el