Filling and Unfilling Paragraphs with Emacs

Like me, Artur Malabarba is a heavy user of fill paragraph. I don’t use visual-line-mode when I’m writing so every time I make an edit I refill the paragraph. Malabarba apparently does the same but being Malabarba has found a way to improve things.

He says that sometimes he wants to unfill a paragraph and would like an easy way of doing that. He noticed that there’s no reason to call fill-paragraph twice in a row so he wrote a bit of glue code to check if the last command filled the paragraph and if so to set fill-column to point-max, which causes fill-paragraph to unfill the paragraph. Finally, he remaps 【Meta+q】 to call his glue code.

If you, like Malabarba, sometimes find yourself needing to unfill a paragraph, head on over to Endless Parentheses and copy his code.

This entry was posted in General and tagged . Bookmark the permalink.