VI map question

Barton E. Schaefer schaefer at ogcvax.ogc.edu
Mon Aug 22 05:28:05 AEST 1988


In article <1069 at zippy.eecs.umich.edu> cja at zippy.eecs.umich.edu
(Charles J. Antonelli) writes:
} In article <1668 at aplcomm.jhuapl.edu> @aplvax.jhuapl.edu:jwm at 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 at 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_



More information about the Comp.unix.wizards mailing list