I'm a big fan of plain text files. Years may pass, new powerful file formats and editors may be released, but they'll never replaced the good, old .txt in my heart. There's this feeling I can't really describe when I see the austere GUI, the monospaced font and the lines of neatly wrapped text on a white background. There's nothing superfluous to distract you. Writing like this forces you to be really focused and compose a mental image, or map, of what you want to convey. From the veteran Windows Notepad to gedit, I've spent thousands of hours staring at editors like these.

And yes, the text MUST be wrapped at 80 columns. I can't accept it otherwise. I don't care if it's 2025 already! I used to wrap it myself, until I discovered a nice little *nix utility named fold. This command will do it for you, but there's a problem: it doesn't work correctly with special characters such as accents. The tool will erroneously think that there are two separate characters and the column count will be wrong. Nothing surprising here; it's an ancient tool. So, how to fix this?

Well, isn't it convenient that I happened to write a Python replacement that properly supports those characters? pfold (proper fold) will work the same way as fold otherwise.

Download