From: John P. Looney (Kate) (jplooney-ilug at domain online.ie)
Date: Mon 03 Jul 2000 - 21:09:31 IST
On Mon, Jul 03, 2000 at 08:17:30PM +0100, Niall O Broin mentioned:
> > I'm annoyed going through a line of text (or block) putting backslashes
> > before all the doublequotes. Anyone got an idea how to make a macro to do
> > that ?
> My views on vi(m) are no secret (and they're shared by Bill Joy, the
> original author of vi) but is it really so worthless an editor that you
> can't simply use its replace function to replace every doublequote by
> backslash + doublequote ? Or am I not understanding the question ?
In the end, I just needed to do:
:vmap " :s/\"/\\\"/^M
So "when stuff is selected, pass the selected text to search/replace \"
for \\\"\".
Means I can highlight an area of text, press the '"' key, and it's
backslashed for me. Handy in TCL/HTML work. I don't want it
search/replacing the whole lot.
Kate
--
The words of the unwary are apt to cause needless pain and bloody violence.
- Zen Master Greg
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:47 GMT