VI (can you fully justify test)
Denis McKeon
dmckeon at hydra.unm.edu
Thu Mar 21 10:34:47 AEST 1991
For quick & dirty justification within vi, try:
:map + J074lBhr^V^M
where ^V^M is control-V control-M, of course. It does a join, then a
split before the word that bridges col 74 (season to taste). This
allows you to handle the small case of a few lines, or a short paragraph
by repeatedly hitting + down to the last line (and without !'ing out).
Bugs
it assumes that the first two lines together are >= 74 chars.
you'll have to open a fresh empty line after the paragraph.
you'll need an empty line after the last line in the document
TAB characters are counted as 1 char instead of <tabstop> chars.
there was ome reason to use 074l instead of 74|, but I don't
recall what the reason was.
Overall, this is a messy hack - but when you use vi on a PC, without
any normal Unix utilities, let alone fmt, it is a (very) small blessing.
--
Denis
dmckeon at hydra.unm.edu
More information about the Comp.unix.misc
mailing list