Skip to content

Neato Unix Command (Friday, April 27, 2007)

fold - wrap each input line to fit in specified width

Great for when your text editor is being stupid.

2 Comments

  1. Ian wrote:

    I’m not sure what text editor you’re using, but if it’s Vim, I presume you’re already aware of gq, gqap etc? They wrap lines, wrap all lines in a paragraph, and so on.

    Saturday, April 28, 2007 at 11:04 am | Permalink
  2. James Bowes wrote:

    It was gedit. I was printing a text file, and the output did not wrap on the printout. So I figured I’d see if there was a command to do the wrapping for me.

    Vim is perfect, of course, and could never be stupid.

    Sunday, April 29, 2007 at 9:19 am | Permalink