does vi have a search/deletion macro???
Kyle Grieser
yuf at mentor.cc.purdue.edu
Fri Sep 8 16:55:32 AEST 1989
In article <4237 at ncar.ucar.edu> morreale at bierstadt.ucar.edu (Peter Morreale) writes:
> 1) How can I search for a string and have all occurrences show
> 2) delete all lines which match the above mentioned search.
>
I'm not quite sure I know what you mean here, but searches are really easy.
You can just use "/<string>". Now if you want to delete lines that have
a match, you can do ":%g/foo/d". This will delete any line with "foo" on
it.
>Does vi have macro capability (w/o changing the source or writing C
>stuff, that's beyond me)? Do I need new glasses to read TFM?
>
>Can I combine some standard vi stuff and map it to a key? (I can do that ;-) )
Yeah, I'm not really sure about the man page, but it is in the standard
"heap-o-unix-manuals" that you should be able to find laying around.
Hope this helps.
-----
Kyle Grieser, Purdue University Computing Center
yuf at mentor.cc.purdue.edu, mentor.cc.purdue.edu!yuf
More information about the Comp.unix.questions
mailing list