It's a bit more work, but you might be able to do that with the perl module Text::Balanced or Text::Autoformat
On Sun, 28 Sep 2003 07:42:48 -0400 Joel Hammer <[EMAIL PROTECTED]> wrote: > Thanks for the suggestion. > > > !Gsed '/^ /d' | fmt -w 130<ENTER> > > This doesn't do what I need, however. > > The newly formatted document will only contain lines which didn't begin > with a blank. Lines beginning with a blank are deleted. > > I did try a sed solution with fmt, though. Please see my post: > "Bug in fmt?" elsewhere on this list. > > Joel > > > On Sat, Sep 27, 2003, Joel Hammer wrote: > > >I want to use fmt in vi to format text, eg: > > > :1,$ ! fmt -w 130 > > > > > >Without vi, this command would look like: > > > cat file ! fmt -w 130 > > > > > >I want it to format everything except lines which begin with at least > > >two blanks, like this: > > > > Extend your command to pipe it through sed first: > > > > This will format the entire document > > Go to the top of the document (1G); > > !Gsed '/^ /d' | fmt -w 130<ENTER> > > > > Bill > > -- > > INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC > > UUCP: camco!bill PO Box 820; 6641 E. Mercer Way > > FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 > > URL: http://www.celestial.com/ > > > > More laws, less justice. -- Marcus Tulius Ciceroca (42 BD) > > _______________________________________________ > > Linux-users mailing list > > [EMAIL PROTECTED] > > Unsubscribe/Suspend/Etc -> http://mail.linux-sxs.org/mailman/listinfo/linux-users > _______________________________________________ > Linux-users mailing list > [EMAIL PROTECTED] > Unsubscribe/Suspend/Etc -> http://mail.linux-sxs.org/mailman/listinfo/linux-users -- ----------------------------------------------------------------------- | Alan K. Jackson | To see a World in a Grain of Sand | | [EMAIL PROTECTED] | And a Heaven in a Wild Flower, | | www.ajackson.org | Hold Infinity in the palm of your hand | | Houston, Texas | And Eternity in an hour. - Blake | ----------------------------------------------------------------------- _______________________________________________ Linux-users mailing list [EMAIL PROTECTED] Unsubscribe/Suspend/Etc -> http://mail.linux-sxs.org/mailman/listinfo/linux-users
