Reflow a pasted document to 80 columns (or back)
Mailing-list replies and README prose want hard-wrapped text; copied PDFs arrive hard-wrapped and need joining. Both directions, one paste.
Tools used in this guide
The job
Two common chores: wrapping loose text to a fixed column (Git commit bodies, email replies) and unwrapping text that arrived with hard line breaks (PDF copy-paste).
Width and direction
Paste the text, set the column (72 for email replies, 80 for code docs), choose wrap or unwrap. Wrap reflows each paragraph; unwrap joins lines with single spaces. Blank lines and leading indents survive both.
- Word-wrap only: a word longer than the column stays whole rather than splitting mid-word.
- Paragraph detection is blank-line based — single line breaks inside a paragraph are treated as join points.
Edge cases
Lists and code blocks reflow like any paragraph — unwrap code and you'll glue it into one line. Select only the prose sections, or re-indent code blocks first so you can spot what to restore.