Subject: Re: meta-control-bucky-vi
To: Peter Seebach <email@example.com>
From: David Maxwell <firstname.lastname@example.org>
Date: 05/24/1995 10:22:05
> Can anyone tell me how to tell vi to replace a character like, say,
> 0x92 (meta-ctrl-r) in vi? Assume I *can't* type high-bit; 7-bit
> rlogin. vi shows them as "0x92". But they don't match "0x92". Can
> I use something obvious like \x92?
Vi wasn't really designed to be an 8-bit editor, you should be able to
get what you want by doing...
[range]!tr s1 s2
with appropriate variables. tr will let you use octal values if you preceed
them with a '\'. If you need Hex, put the following in your personal bin
directory as 'x'.
echo -n \\
Now you can do...
[range]!tr a `x E9`
All of this is pretty shell-independent - feel free to add aliases and vi
macros to taste. :-)