Newsgroups: comp.editors
Path: utzoo!sq!lee
From: lee@sq.sq.com (Liam R. E. Quin)
Subject: Re: How do a write a specific macro in vi
Message-ID: <1991Feb7.204101.2357@sq.sq.com>
Organization: SoftQuad Inc., Toronto, Canada
References: <1991Jan31.202742.13674@chinet.chi.il.us> <1104@gagme.chi.il.us> <1991Feb4.140543.5837@computing-maths.cardiff.ac.uk>
Date: Thu, 7 Feb 91 20:41:01 GMT
Lines: 20

>>>>I need to globally remove all control-H in a file, and also all the
>>>>underscores (_) in a file. 
>>>
>>>I suspect that you really want to remove any character followed by
>>>a control-H.  This will also fix boldfacing done by overstriking.
If (like me) you have neither ``plain'' nor ``pep'', (I'd expect the latter
to be a comms package from Telebit!), don't despair.

You can use the filter "col -b" to do just this:
	1G!Gcol -b
works fine from within vi, for example.

Deleting control-h and _ in vi is also easy, of course:
	:%s/[^H_]//g
(you have to type control-V control-H tp get the ^H in there, of course)

Lee

-- 
Liam R. E. Quin,  lee@sq.com, SoftQuad Inc., Toronto, +1 (416) 963-8337
