Sava.rocks talks about formatting gopher posts with 'fmt' [0]. The fmt tool does work, but is simplistic in its formatting - a more featured tool is 'par', which like fmt, operates on a STDIN/STDOUT stream. Here is a basic usage example, which formats 'file.txt', left-justified to a width of 68 chars: par 68 < file.txt > formatted-file.txt But par (and fmt) are best used from within your editor. Here is how to format an entire text file from within vi/nvi, left-justified to a width of 68: !Gpar 68 Use '68j' if you want the text to be fully justified (all lines will be exactly 68 chars wide). Or, you can add lines like these to your .exrc/.nexrc, which maps Alt-q to format the current paragraph (this key binding is taken from emacs fill-paragraph, which is what I am used to), or Q, which formats the entire file. map ^]q {!}par P=[ 68^M} map Q 1G!Gpar P=[ 68^MG The above is what I use - the 'P=[' option excludes (protects) lines that start with '[', handy for markdown lists of links that you don't normally want to re-format. The key sequence '^[q' is Alt-q, and can be entered in input mode by pressing Ctrl-v and then Alt-q. Similarly, '^M' can be entered as Ctrl-v, followed by the 'Enter' key. Par has an excellent man page, with lots of examples. In ed you can format the entire file you're editing using something like: !par P=[ 68 < % In emacs, you don't need an external tool, there is a nice function 'fill-paragraph', which, as I mentioned above, is normally bound to M-q (Alt-q). You can set your text width (called the fill-column) with 'C-x f' (I usually set it to 68), then when you press M-q while the point is within a paragraph of text, that paragraph will be left-justified to the fill-column width. You can fully justify the text with 'C-u M-q'. To reformat the entire editing buffer, select the entire buffer with 'C-x h', then do 'M-x fill-region'. You can also put something like the following in your .emacs: (setq fill-column 68) (global-set-key "\M-\C-q" 'fill-region) Then you can fill the current region with M-C-q (Alt-Ctrl-q), while M-q will still operate on the current paragraph. [0]: gopher://sava.rocks/1/blog/formatting-text-for-gopher-the-easy-way-with-fmt/