Vi

Howard Siegel 4-2390 x4064 hsiegel%jsbach.prime.com at relay.cs.ne
Wed Jun 7 14:10:39 AEST 1989


Thomas Hoyt <cvbnet!decvax!ddn-wms.arpa!thoyt> asks:
>   Can Vi reformat a paragraph, justifying it properly(left, right, or
>centered)?  I hate editing text when I have to rejustify the right
>margin by hand after deleting or adding to a line at the top of a
>paragraph.

"Vi" itself cannot, but in combination with (for instance) "fmt" it can.
Suppose that your paragraph spans lines 12-19 after your addition. Then
the ("ex") command
	:12,19!fmt
will justify your paragraph, and not allow any line to exceed 72
characters (the default for "fmt").  You can, of course, use other
"fmt" options to modify this behavior.

Howard Siegel			hsiegel at piano.prime.com
Prime/Computervision		hsiegel at primerd.prime.com
Bedford, Mass.			hsiegel%piano.prime.com at RELAY.CS.NET
(617) 275-1800 x4064		cvbnet!hsiegel at primerd.prime.com



More information about the Comp.unix.questions mailing list