🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3155

Re: Vi macro question

#3155
From: Hans Mulder
Date: Tue, 24 May 1988 15:14
26 lines
1432 bytes
In article <3365@saturn.ucsc.edu> joseph@chromo.ucsc.edu (Joseph Reger) writes:
>
>A question: I need a macro to type in accented characters in TeX, e.g.: \' or \".
>It is logical to me that I use the keys ' or " for this. But a macro definition
>:map! ' \'
>produces the error message: No tail recursion. 

Try:

:map! ' \^V^V' ^H

The ^Vs are control-Vs and you need to type four of them to get two, one of
which will eventually prevent the ' from being recursively expanded.
The space-backspace combination at the end fools the tail recursion check.

To enter a literal backspace into your file, you quote it with a ^V.
If you make a mistake in a :map! command and make a second attempt, you
also quote the ' (or whatever) with ^V to prevent it from being expanded.
So you may have to type

:map! ^V' \^V^V^V^V^V' ^V^H

to obtain the command above.  And, of course, if you ever want to type a '
that should not be map!ped to \' you quote it with ^V.

Hans Mulder	hansm@cwi.nl	mcvax!hansm
Technical Details
Message-ID: <335@piring.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hansm
References: <3365@saturn.ucsc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hansm
From: hansm@cwi.nl (Hans Mulder)
Newsgroups: comp.editors
Subject: Re: Vi macro question
Keywords: Vi, editor, macro
Message-ID: <335@piring.cwi.nl>
Date: 24 May 88 15:14:18 GMT
References: <3365@saturn.ucsc.edu>
Organization: CWI, Amsterdam
Lines: 26