Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!adm!xadmx!hsiegel%jsbach.prime.com@relay.cs.net From: hsiegel%jsbach.prime.com@relay.cs.ne (Howard Siegel 4-2390 x4064) Newsgroups: comp.unix.questions Subject: Re: Vi Message-ID: <19901@adm.BRL.MIL> Date: 7 Jun 89 04:10:39 GMT Sender: news@adm.BRL.MIL Lines: 18 Thomas Hoyt 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@piano.prime.com Prime/Computervision hsiegel@primerd.prime.com Bedford, Mass. hsiegel%piano.prime.com@RELAY.CS.NET (617) 275-1800 x4064 cvbnet!hsiegel@primerd.prime.com