Par: awesome text reformatting

Since I’m constantly working with text reformatting it in a useful way that is quick and easy is essenttial to keep working. Previously I used to rely on my editors reformatting, but since this kept constantly screwing up especially working with Python where whitespace is important and I was looking for a better way, and discovered the nice little utility par. So far pretty much all the reformatting happend as expected, it works perfectly with nested comments and quoted email.

Adding a quick line to the vimrc file makes Vim use par for reformatting which is really useful to never really have to leave my editor.

set formatprg=par -w80q

This will make reformat with a width of 80 characters (-w) and keep quoting even if line is empty (-q).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.