Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!gatech!purdue!mentor.cc.purdue.edu!yuf From: yuf@mentor.cc.purdue.edu (Kyle Grieser) Newsgroups: comp.unix.questions Subject: Re: does vi have a search/deletion macro??? Keywords: vi, macros, TFM?, glasses Message-ID: <3937@mentor.cc.purdue.edu> Date: 8 Sep 89 06:55:32 GMT References: <4237@ncar.ucar.edu> Reply-To: yuf@mentor.cc.purdue.edu (Kyle Grieser) Distribution: usa Organization: PUCC UNIX Group Lines: 22 In article <4237@ncar.ucar.edu> morreale@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 "/". 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@mentor.cc.purdue.edu, mentor.cc.purdue.edu!yuf