A variance-optimal paragraph formatter. It has only three rules:
- Minimize the variance of the lengths of each line...
- ...subject to the constraint that the number of lines is smallest.
- Ignore the last line, while making sure it's shorter than average.
The program inflow
reads its input from stdin and writes to stdout.
It takes a single positional argument, the maximum number of characters
per line, e.g. inflow 72
. The default width if unspecified is 79.
A previous version of this program was called far
.
See far: a (f)ast re-write of the Unix utility p(ar) for more information.
Inflow is packaged in
Nixpkgs as pkgs.inflow
and
PyPi as python-inflow
.
- (neo)vim: set
formatprg
toinflow
orinflow 72
- emacs: far.el