Xref: utzoo comp.unix.questions:8940 comp.unix.wizards:10631 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!tektronix!percival!littlei!ogcvax!schaefer From: schaefer@ogcvax.ogc.edu (Barton E. Schaefer) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: VI map question Message-ID: <1762@ogcvax.ogc.edu> Date: 21 Aug 88 19:28:05 GMT References: <1668@aplcomm.jhuapl.edu> <1069@zippy.eecs.umich.edu> Reply-To: schaefer@ogcvax.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 27 In article <1069@zippy.eecs.umich.edu> cja@zippy.eecs.umich.edu (Charles J. Antonelli) writes: } In article <1668@aplcomm.jhuapl.edu> @aplvax.jhuapl.edu:jwm@stdc.jhuapl.edu } (Jim Meritt) writes: } >I am trying to get fmt mapped in my .exrc (to format and replace text) ... } } i use: } map @ {j!}fmt^M}be } hitting @ anywhere within a paragraph formats the paragraph, then positions } to the next paragraph. you type ^V^M to put ^M in your .exrc (assuming ^V is } your `literal-next' character). you can replace `fmt' with any legal shell } command line, which should answer your second question. As long as you remember that you have to escape the pipe character `|', which is used as the "ex" command separator. You need to put an extra literal-next character (usually ^V, as noted) into your .exrc file to accomplish this, i.e., map @ {j!}neqn~V|nroff -me^M}be Sometimes, you even need an extra ^V in front of the ^M -- it depends on your local vi peculiarities. Note that you have to type TWO ^Vs to get one inserted into the file. -- Bart Schaefer CSNET schaefer@cse.ogc.edu UUCP ...{tektronix,verdix}!ogcvax!schaefer "... by definition the Turing test requires a machine capable of lying to people and misleading them." -- Roger Zelazny, _Sign_of_Chaos_