Article View: comp.editors
Article #1372Re: Yet another FMT problem
From: Neil Weisenfeld
Date: Fri, 13 Nov 1992 16:18
Date: Fri, 13 Nov 1992 16:18
45 lines
1926 bytes
1926 bytes
keithv@cory.Berkeley.EDU (Keith Vetter) writes: : I've tried using the solution in the FAQ to format paragraphs, namely : :!}fmt : but when I do this I get the error message: : }fmt: Command not found. : : I really do have it. In fact if I do map F !}fmt ^[ : it works fine. : : Any ideas? (my .cshrc file doesn't do anything weird) : : Keith As do many keys, ``!'' does different, but related, things in different contexts within Vi. When in command mode, doing !}fmt runs the program ``fmt'' as a filter on the region from the current point up until the end of the paragraph. (Just as y} would yank up until the end of the paragraph and d} would delete until the end of the paragraph). Ex has a related ! command and that is what you are using when you prefix ! with a colon. The ! command has a similar syntax as other ex commands: <region address>!fmt This runs fmt as a filter on the region selected by <region address>, e.g.: :1,2!fmt filter lines 1 and 2 through fmt :.,$!fmt filter the current line to and including the last line through fmt :1,$!fmt :%!fmt both say filter the entire file through fmt. Hope that helps. --Neil -- Neil I. Weisenfeld National Institutes of Health Computer Engineer Building 12A, Room 2033 weisen@alw.nih.gov Bethesda, MD 20892 uunet!nih-csl!weisen phone: (301) 402-2788
Technical Details
Message-ID:
<1992Nov13.161840.17182@alw.nih.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!nih-csl.dcrt.nih.gov!daedalus.dcrt.nih.gov!weisenReferences:
<1992Nov13.010120.11016@pasteur.Berkeley.EDU>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!nih-csl.dcrt.nih.gov!daedalus.dcrt.nih.gov!weisen From: weisen@daedalus.dcrt.nih.gov (Neil Weisenfeld) Subject: Re: Yet another FMT problem Message-ID: <1992Nov13.161840.17182@alw.nih.gov> Sender: postman@alw.nih.gov (AMDS Postmaster) Organization: National Inst. of Health, DCRT, CSL X-Newsreader: Tin 1.1 PL4 References: <1992Nov13.010120.11016@pasteur.Berkeley.EDU> Date: Fri, 13 Nov 1992 16:18:40 GMT Lines: 45